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

Fix issue with chplconfig not supporting variables with equals signs #26178

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

jabraham17
Copy link
Member

@jabraham17 jabraham17 commented Oct 30, 2024

Fixes an issue where if a chplconfig file has a variable with a value that contains an equals sign, it will break with an error like Warning: Syntax Error: $CHPL_HOME/chplconfig:line.

This resolves an issue a user saw on a system where --gcc-toolchain=... was apart of the definition for CHPL_TARGET_CC/CXX

[Reviewed by @e-kayrakli]

Signed-off-by: Jade Abraham <[email protected]>
@jabraham17 jabraham17 merged commit e75e707 into chapel-lang:main Oct 30, 2024
7 checks passed
@jabraham17 jabraham17 deleted the fix-chplconfig-equals branch October 30, 2024 21:18
bradcray added a commit to bradcray/chapel that referenced this pull request Oct 31, 2024
…ings.chpl working

While paratesting my branch tonight, I found that

  chplenv/chplconfig/warnings/warnings.chpl

was failing due to PR chapel-lang#26178.  Though I'm not that familiar with this
logic, it seems that reverting half of the changes in it keeps this
test working as expected, though it may suggest we need to do more to
both achieve the PR's aim and also keep errors for cases like this.

---
Signed-off-by: Brad Chamberlain <[email protected]>
bradcray added a commit that referenced this pull request Oct 31, 2024
…orking (#26180)

[reviewed by @DanilaFe ]

While paratesting my branch tonight, I found that

  chplenv/chplconfig/warnings/warnings.chpl

was failing due to PR #26178. Though I'm not that familiar with this
logic, it seems that reverting half of the changes in it keeps this test
working as expected, though it may suggest we need to do more to both
achieve the PR's aim and also keep errors for cases like this.
jabraham17 added a commit that referenced this pull request Oct 31, 2024
Properly handles the parsing of chplconfig files.
#26178 added the ability to
parse chplconfig variables with values including `=`, but that broke the
warning for something like `CHPL_VAR==value`.

This PR resolves the issue by refactoring some of the parsing code in
`overrides.py` to check error cases in `skip_line`, rather than relying
on python exceptions. Then to avoid duplication of logic, renames
`skip_line` to `check_line` and has it return the parsed variable.

Fixes the issue introduced in
#26178 and reverts
#26180

Tested by running `start_test test/chplenv`

[Reviewed by @DanilaFe]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants