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

Require setupModuleSearchPaths be called before any other queries #25315

Merged
merged 7 commits into from
Jun 27, 2024

Conversation

riftEmber
Copy link
Member

@riftEmber riftEmber commented Jun 18, 2024

Require that setting the module search path occurs before any other queries in the Context revision, if at all. This is to prevent unexpected results from its default empty value being used before it is set, as many queries rely on it. Implemented as an assertion that it is the first query run in the revision.

Also change testInteractive to setup module search path earlier to be in line with this requirement. This fixes buggy behavior with testInteractive --std, in which we might not find standard module types, that was incidentally introduced in #25190.

Depends on #25326 which should be merged first.

[reviewer info placeholder]

Testing:

  • paratest
  • dyno tests
  • testInteractive with basic program
  • chpl --dyno with basic program

@DanilaFe
Copy link
Contributor

Looks like something in chplcheck is running a query before setting standard module paths. This is surprising, and might have to do with the Python bridge.

@riftEmber
Copy link
Member Author

@DanilaFe how do I reproduce failures from that? I built with make chplcheck and tested start_test test/chplcheck and everything passed

@riftEmber
Copy link
Member Author

Nvm, I see the CI failure from make lint-standard-modules now

@vasslitvinov
Copy link
Member

@riftEmber if this PR has user-facing outcomes, could you please mention them in the OP?

@riftEmber
Copy link
Member Author

@vasslitvinov Yes, good reminder. Updated

@riftEmber riftEmber force-pushed the modulesearchpath-init branch 2 times, most recently from 8b2f052 to b319e2c Compare June 20, 2024 18:03
@riftEmber riftEmber requested a review from DanilaFe June 20, 2024 18:03
@riftEmber riftEmber force-pushed the modulesearchpath-init branch 2 times, most recently from 49cb543 to 3859261 Compare June 20, 2024 18:15
@riftEmber riftEmber merged commit bc34538 into chapel-lang:main Jun 27, 2024
8 checks passed
@riftEmber riftEmber deleted the modulesearchpath-init branch June 27, 2024 16:02
riftEmber added a commit that referenced this pull request Jul 3, 2024
Resolve tuple `this` calls (with non-param index values) in Dyno.

This is implemented by wiring up Dyno's `TupleType` to
`ChapelTuple._tuple` in the bundled modules. The module implementation
of `_tuple.size` (called by `this`) is technically used but its param
value is computed by dyno, since in production it is only set later
during generic instantiation.

Depends on: #25007,
#25102,
#25231,
#25315.

Resolves Cray/chapel-private#6104.

[reviewed by @dlongnecke-cray , thanks!]

Testing:
- [x] dyno tests
- [x] paratest
- [x] reproducer from backing issue now resolves
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants