Git Product home page Git Product logo

Comments (3)

scottdurow avatar scottdurow commented on May 26, 2024 3

Rather than block the pack - could comments be allowed but a warning emitted to indicate that they won't be retained if you round trip - I can think of situations where comments would be useful in code-gen type scenarios.

from powerapps-tooling.

MikeStall avatar MikeStall commented on May 26, 2024

We do not support Yaml comments in the .pa.yaml file. This is because we they would get dropped during a round trip.
We do support PowerApps comments in the formulas (use // )

We should be giving parser errors in the cases above to explicitly warn which parts of Yaml are not in the supported subset.

We're capturing the docs for this here:
https://github.com/microsoft/PowerApps-Language-Tooling/blob/master/docs/YAMLFileFormat.md#yaml-comments

from powerapps-tooling.

MikeStall avatar MikeStall commented on May 26, 2024

We'll allow comments on their own line.
But we still reject yaml comments on a line with other formulas - because it's too easy that the intention was actually a formula and we're trying to protect against confusion (and against the formulas being accidentally interpreted as yaml comments and stripped )

Screen1 As screen:
    # A comment    <-- this yaml comment is ok 
    FillColor: = # FF00CC   <-- this is an error.  Yaml comment not allowed,     

We'll give a warning now like:

Pack: D:\dev\pa2\Samples\FullDemo\Weather\MyWeather_src --> D:\dev\pa2\Samples\FullDemo\Weather\temp.msapp
Warning PA2010: Yaml comments don't roundtrip. at Screen1.pa.yaml:14,1-14,1
0 errors, 1 warnings.

from powerapps-tooling.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.