Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Augment expression parsing error with position #1887

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

mr0re1
Copy link
Collaborator

@mr0re1 mr0re1 commented Oct 26, 2023

  • Augment expression parsing error with position;
  • Remove YAML parsing error: prefix.
vars:
  project_id: $(6 + 4) # Case #1
  hello: ((world+))    # Case #2

BEFORE

# Case #1
YAML parsing error: only traversal expressions are supported, got "6 + 4"
# Case #1
YAML parsing error: :0,6-6: Missing expression; Expected the start of an expression, but found the end of the file.

AFTER

# Case #1
Error: only traversal expressions are supported, got "6 + 4"
2:   project_id: $(6 + 4)
# Case #2
Error: :0,6-6: Missing expression; Expected the start of an expression, but found the end of the file.
2:   hello: ((world+))

* Augment expression parsing error with position;
* Remove `YAML parsing error: ` prefix.

```yaml
vars:
  project_id: $(6 + 4) # Case #1
  hello: ((world+))    # Case #2
```

```sh
YAML parsing error: only traversal expressions are supported, got "6 + 4"
YAML parsing error: :0,6-6: Missing expression; Expected the start of an expression, but found the end of the file.

Case #1
Error: only traversal expressions are supported, got "6 + 4"
2:   project_id: $(6 + 4)
Case #2
Error: :0,6-6: Missing expression; Expected the start of an expression, but found the end of the file.
2:   hello: ((world+))
```
@mr0re1 mr0re1 added the release-chore To not include into release notes label Oct 26, 2023
@mr0re1 mr0re1 requested a review from cdunbar13 October 26, 2023 00:13
@mr0re1 mr0re1 enabled auto-merge (squash) October 26, 2023 00:13
Copy link
Contributor

@cdunbar13 cdunbar13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mr0re1 mr0re1 merged commit 882a913 into GoogleCloudPlatform:develop Oct 26, 2023
7 of 34 checks passed
max-nag pushed a commit to max-nag/hpc-toolkit that referenced this pull request Oct 27, 2023
)

* Augment expression parsing error with position;
* Remove `YAML parsing error: ` prefix.

```yaml
vars:
  project_id: $(6 + 4) # Case #1
  hello: ((world+))    # Case GoogleCloudPlatform#2
```

```sh
YAML parsing error: only traversal expressions are supported, got "6 + 4"
YAML parsing error: :0,6-6: Missing expression; Expected the start of an expression, but found the end of the file.

Case #1
Error: only traversal expressions are supported, got "6 + 4"
2:   project_id: $(6 + 4)
Case GoogleCloudPlatform#2
Error: :0,6-6: Missing expression; Expected the start of an expression, but found the end of the file.
2:   hello: ((world+))
```
@mr0re1 mr0re1 deleted the path4 branch March 7, 2024 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-chore To not include into release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants