Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,3 @@ jobs:
if: runner.os != 'Windows'
run: dotnet test --no-build --project src/PAModelTests/PAModelTests.csproj --framework net10.0
continue-on-error: true
- name: Test - YamlValidator.Tests (net8.0)
if: runner.os != 'Windows'
run: dotnet test --no-build --project src/YamlValidator.Tests/YamlValidator.Tests.csproj --framework net8.0
continue-on-error: true
12 changes: 0 additions & 12 deletions docs/KnownIssues.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,6 @@

This page lists all the ongoing known issues in PowerApps-Language-Tooling for which we have workarounds. These aren't necessarily bugs introduced in the pack/unpack utility but rather issues arising out of continuously evolving enhancements in the `.msapp` format that has been leading to issues when attempting to unpack apps built using older versions of Power Apps Studio. These are suggested workarounds that will help bring these apps to the latest format specification. This document will be continuously updated as issues and workarounds are discovered.

## Warning PA2001: Checksum mismatch. AppTests\2.json checksum does not match on extract

This is a known issue with apps developed with a previous version of Studio, and has now been resolved. This error is known to occur due to a stray empty test step that gets added when unpacking the msapp. This can be resolved by adding an action to the empty test step and then deleting the test entirely by the following steps -

1. Open the msapp back into the Power Apps Studio
2. Navigate to Tests
3. Edit the empty test step to add any non-empty action, such as `ClearCollect(‘foo’, [])`
4. Now delete the entire test, which should happen successfully
5. Save the app to local workspace and then unpack

The app should now unpack successfully without any errors or warnings associated with Tests.

## Error PA3013: Property Value Changed: TopParent.AllowAccessToGlobals (or similar)

This can occur if the AllowAccessToGlobals field (associated with the Access app scope property for a custom component) within the msapp's Components json is not in sync with the same field in the ComponentsMetadata.json file. This can be resolved by the following steps -
Expand Down
30 changes: 15 additions & 15 deletions docs/YAMLFileFormat.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Legacy Power Apps YAML Source File Format
# Experimental Power Apps YAML Source File Format

> [!WARNING]
> **This format is generated by PASopa and will likely change**
> **This document describes the 'Experimental' format generated by PASopa, which is deprecated.**

The Power Apps formula language has a well established grammar for expressions based on Excel. However, it lacks the syntax for binding an expression to a property, this has always been handled behind the scenes.

We have selected the industry standard [YAML](https://yaml.org/spec/1.2/spec.html) as our language for this binding. There are already a large number of editors, tools, and libraries for manipulating YAML. This document describes how we represent formulas in YAML.

At this time, we support only a restricted subset of YAML. Only the constructs described in this document are supported.
At this time, we support only a restricted subset of YAML. Only the constructs described in this document are supported.

This is very much a work in progress and may change. Not everything that defines a Canvas app is represented here, additional information flows through the other files that the tool produces and consumes.

Expand All @@ -34,7 +34,7 @@ Single-line formulas are written in the form:

*Name* `:` `SPACE` `=` *Expression*

The space between the colon and the equals sign is required to be YAML compliant. The equals sign disrupts YAML's normal interpretation of the expression, allowing the rest of the line to be interrupted as the formula language.
The space between the colon and the equals sign is required to be YAML compliant. The equals sign disrupts YAML's normal interpretation of the expression, allowing the rest of the line to be interrupted as the formula language.

For example:

Expand All @@ -54,7 +54,7 @@ See the canvas app [operators and identifiers](https://docs.microsoft.com/en-us/

## Multi-line formulas

Formulas can span multiple lines using YAML's block scalar indicators:
Formulas can span multiple lines using YAML's block scalar indicators:

*Name* `:` `SPACE` ( `|` or `|+` or `|-` )
 `=` *Expression-Line*
Expand Down Expand Up @@ -97,14 +97,14 @@ Gallery1 As Gallery.horizontalGallery:
=If( Lower( Left( Self.Text, 6 ) ) = "error:",
Color.Red,
Color.Black
)
)
```

*Component-Type* can be any canvas component or control. Base types, such as *Number* are not supported.

*Component-Template* is an optional specifier for components that have different templates such as the Gallery. Not all components will have templates.

If *Name* contains special characters and is wrapped with single quotes, then the entire phrase to the left of the colon will need to be escaped. This can be done in two ways:
If *Name* contains special characters and is wrapped with single quotes, then the entire phrase to the left of the colon will need to be escaped. This can be done in two ways:
- Use single quotes to wrap the entire left hand side, requiring the existing single quotes to be doubled:
```
'''A name with a space'' As Gallery':
Expand All @@ -127,39 +127,39 @@ Components use properties to communicate with the app in which they are hosted.

*Name* `:` ( *Single-Line-Expression* or *Multi-Line-Expression* )

The type of the formula is implied by the type of the expression.
The type of the formula is implied by the type of the expression.

For input properties, the expression provides the default to be inserted into the app when the component is instanced. The app maker can modify this expression as they see fit, but cannot change the type.

For output properties, the expression provides the calculation to be performed. The app maker cannot modify this expression, it is encapsulated in the component.
For output properties, the expression provides the calculation to be performed. The app maker cannot modify this expression, it is encapsulated in the component.

At this time, all properties are data flow only and cannot contain side effects.

At this time, additional metadata about the property is not defined here but is instead in the other files of the .msapp file, for example the property's description.
At this time, additional metadata about the property is not defined here but is instead in the other files of the .msapp file, for example the property's description.

For example:

```
DateRangePicker As CanvasComponent:
DefaultStart: |-
=// input property, customizable default for the component instance
Now()
Now()
DefaultEnd: |-
=// input property, customizable default for the component instance
DateAdd( Now(), 1, Days )
DateAdd( Now(), 1, Days )
SelectedStart: =DatePicker1.SelectedDate // output property
SelectedEnd: =DatePicker2.SelectedDate // output property
```

## YAML compatibility
## YAML compatibility

### YAML comments

YAML's `#` line comments are not preserved anywhere in the source format. Instead, within a formula, use the formula language's line comments that start with `//` or block comments that are delimited with `/*` and `*/`.
YAML's `#` line comments are not preserved anywhere in the source format. Instead, within a formula, use the formula language's line comments that start with `//` or block comments that are delimited with `/*` and `*/`.

### Errors for common pitfalls

There are a few places where the formula language and YAML grammars are incompatible or could be confusing for a user. In these cases, we will throw an error.
There are a few places where the formula language and YAML grammars are incompatible or could be confusing for a user. In these cases, we will throw an error.

For example in:
```
Expand Down
Binary file removed docs/images/stock-ai/image1.jpg
Binary file not shown.
Binary file removed docs/images/stock-ai/image2.jpg
Binary file not shown.
Binary file removed docs/images/stock-ai/image3.jpg
Binary file not shown.
Binary file removed docs/images/stock-ai/image4.jpg
Binary file not shown.
Binary file removed docs/images/stock-ai/image5.jpg
Binary file not shown.
69 changes: 0 additions & 69 deletions docs/pa.yaml-schema.json

This file was deleted.

Loading
Loading