Skip to content

better behaved loading errors #57727

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

Merged
merged 4 commits into from
Mar 14, 2025
Merged

better behaved loading errors #57727

merged 4 commits into from
Mar 14, 2025

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Mar 11, 2025

3 interrelated fixes here:

  • Re-word the confusing error message for a circular dependency error.
  • Calling using inside a package was previously declared to be an error, but never really enforced, so allow it explicitly to do what it logically means (when appearing explicitly, such as from having Requires.@require in an __init__ function). Remove the associated warning in the docs, since this gotcha now simply means what users think it would mean.
  • A missing lock acquire in create_expr_cache lead to a confusing discrepancy in errors related to the previous two fixes between incremental and serial modes.

Fixes #56742

@vtjnash vtjnash added packages Package management and loading don't squash Don't squash merge backport 1.12 Change should be backported to release-1.12 labels Mar 11, 2025
@vtjnash vtjnash changed the title better behaved loading better behaved loading errors Mar 11, 2025
@nsajko nsajko added the needs news A NEWS entry is required for this change label Mar 12, 2025
@nsajko
Copy link
Contributor

nsajko commented Mar 12, 2025

this gotcha now simply means what users think it would mean

Needs news?

@vtjnash vtjnash force-pushed the jn/using-moduleroot branch from bf1d741 to 2b33557 Compare March 14, 2025 14:33
vtjnash and others added 3 commits March 14, 2025 14:41
… itself) without dot

Also clean up and fix some related manual errata that had become
incorrect over time.
…create a module

Avoids a discrepency in behavior between direct loading and precompile
@vtjnash vtjnash force-pushed the jn/using-moduleroot branch from 2b33557 to 7a9c7cc Compare March 14, 2025 14:41
@vtjnash vtjnash removed the needs news A NEWS entry is required for this change label Mar 14, 2025
@vtjnash vtjnash merged commit 7f8ca29 into master Mar 14, 2025
5 of 8 checks passed
@vtjnash vtjnash deleted the jn/using-moduleroot branch March 14, 2025 18:56
KristofferC pushed a commit that referenced this pull request Mar 21, 2025
3 interrelated fixes here:
- Re-word the confusing error message for a circular dependency error.
- Calling `using` inside a package was previously declared to be an
error, but never really enforced, so allow it explicitly to do what it
logically means (when appearing explicitly, such as from having
`Requires.@require` in an `__init__` function). Remove the associated
warning in the docs, since this gotcha now simply means what users think
it would mean.
- A missing lock acquire in create_expr_cache lead to a confusing
discrepancy in errors related to the previous two fixes between
incremental and serial modes.

Fixes #56742

(cherry picked from commit 7f8ca29)
@KristofferC KristofferC removed the backport 1.12 Change should be backported to release-1.12 label Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
don't squash Don't squash merge packages Package management and loading
Projects
None yet
Development

Successfully merging this pull request may close these issues.

package_locks not held while loading package
3 participants