Skip to content

julia: derive stdlib floors for workspace and test environments from the Julia range Pkg resolves them under - #16315

Merged
v-robaiken merged 1 commit into
dependabot:mainfrom
IanButterworth:julia-compat-tests-project
Sep 17, 2026
Merged

v-robaiken merged 1 commit into
dependabot:mainfrom
IanButterworth:julia-compat-tests-project

Conversation

@IanButterworth

@IanButterworth IanButterworth commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

#16229 created a bunch of superfluous PRs because I didn't realize julia compat wasn't being respected across linked Projects in the way Pkg does.

This fixes that.

What are you trying to accomplish?

The helper derived a project's stdlib compat floors from that file's own julia compat entry alone, and the parser wrote every Project.toml into its own isolated temp directory. A workspace member or a package's test/Project.toml usually has no julia entry, so it was treated as supporting every Julia release and got floors like Statistics = "0.0.0, 1" while the package beside it said julia = "1.10". That produced spurious widening PRs on those files.

This follows what Pkg enforces instead. The rule in effective_julia_compat (julia/helpers/DependabotHelper.jl/src/stdlibs.jl):

  • A package (name and uuid, Pkg's env.pkg) uses only its own julia entry. It is also installed on its own, from a registry or by path, where nothing else applies, so a workspace it sits in must not narrow its compat entries. This covers the workspace root and any sub-package member.
  • A workspace environment (test/, docs/, anything without name and uuid) intersects its own entry with every project in the workspace: root, siblings, nested members. That is exactly Pkg.Operations.get_compat_workspace, and Pkg.test runs a member test/ in place inside the workspace rather than in a sandbox, so there is no wider range to cover.
  • A test/ environment outside a workspace intersects its own entry with the package in the parent directory, since the Pkg.test sandbox loads the package and Pkg.Operations.collect_project refuses a Julia its julia entry excludes. A test/ under a plain environment, or a test/ project that is itself a package, inherits nothing.

The Ruby parser now lays all project files out in one temp tree at their repository paths (via DependencyFile#path, which also resolves ../Project.toml safely) so Pkg can see those parents. A lone Project.toml behaves exactly as before.

Anything you want to highlight for special attention from reviewers?

An ancestor-only rule (member inherits from the workspace root) was the first cut; it was replaced by Pkg's own intersection over every workspace project because that is what the shared manifest actually resolves under, and a narrower sibling would otherwise be ignored. Packages are exempt on purpose: narrowing a package's compat entries to the workspace intersection would break installing it on its own.

At ecosystem scale only stdlib compat floors in workspace member files and test/Project.toml next to a package change, and only towards narrower ranges. The effect is fewer proposed widenings, never a new kind of PR. Outside a workspace test/Project.toml is not fetched today, so the sandbox rule only applies when a workspace lists test or Dependabot targets a test/ directory.

How will you know you've accomplished your goal?

New helper tests cover a workspace with root, siblings and a nested member (environments take the intersection, a sub-package keeps its own range), a package's test/ environment outside a workspace, a plain environment's test/ directory (no inheritance) and a test/ project that is itself a package. New parser specs cover the same cases end to end through the Ruby side, including a root fetched as ../Project.toml when Dependabot targets a member directory.

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

@IanButterworth
IanButterworth requested a review from a team as a code owner September 16, 2026 16:32

@DilumAluthge DilumAluthge left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

In the cases listed, the new behavior looks correct to me.

SGTM.

@IanButterworth

Copy link
Copy Markdown
Contributor Author

@robaiken should be ready for review

…the Julia range Pkg resolves them under

The helper derived a project's stdlib compat floors from that file's own
`julia` compat entry alone, and the parser wrote every Project.toml into
its own isolated temp directory. A workspace member or a package's
test/Project.toml usually has no `julia` entry, so it was treated as
supporting every Julia release and got floors like
`Statistics = "0.0.0, 1"` while the package beside it said
`julia = "1.10"`.

Follow what Pkg enforces instead. A package (name and uuid, `env.pkg`)
keeps its own entry, since it is also installed on its own where nothing
else applies. A workspace environment takes
`Pkg.Operations.get_compat_workspace`, the intersection over every
workspace project, which is what the shared manifest resolves under and
how `Pkg.test` runs a member test/ environment. A package's test/
environment outside a workspace intersects with the package, which the
`Pkg.test` sandbox loads and whose `julia` entry `collect_project`
enforces. The parser now lays all project files out in one temp tree at
their repository paths so Pkg can see those parents; a lone Project.toml
behaves as before.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@IanButterworth
IanButterworth force-pushed the julia-compat-tests-project branch from 5caea30 to 3ff1dc8 Compare September 17, 2026 14:17
@v-robaiken
v-robaiken merged commit 3c512db into dependabot:main Sep 17, 2026
61 checks passed
CarloLucibello added a commit to JuliaGenAI/HuggingFaceDatasets.jl that referenced this pull request Oct 19, 2026
)

- CondaPkg.toml: admit datasets ">=4.0, <6"; replace the `python <3.14` pin
  with a `python-gil` dependency, which excludes only conda-forge's
  free-threaded builds.
- Project.toml: PythonCall >= 0.9.37, needed for conda-forge's Python 3.15
  (no bundled libpython), which a fresh env now resolves to.
- docs/make.jl: start multiprocessing's resource tracker before makedocs.
  Python >= 3.14 defaults to forkserver, so datasets spawns the tracker
  lazily; spawned inside a doctest it inherits Documenter's capture pipe and
  the build hangs.
- test/Project.toml: revert Distributed/Serialization compat to "1". The
  "< 0.0.1" entries came from a Dependabot bug that ignored the workspace's
  julia compat (fixed in dependabot/dependabot-core#16315); julia >= 1.10
  does not need them.

Closes #82, closes #57.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

3 participants