Repository navigation
Conversation
Alizter
force-pushed
the
push-mnvztyotquus
branch
4 times, most recently
from
June 4, 2026 15:04
5772aed to
d362bc7
Compare
Alizter
force-pushed
the
push-mnvztyotquus
branch
2 times, most recently
from
June 8, 2026 10:58
4c65d6e to
1493764
Compare
Alizter
force-pushed
the
push-mnvztyotquus
branch
5 times, most recently
from
June 11, 2026 16:00
bc2ff9f to
f5c1d93
Compare
Alizter
force-pushed
the
push-mnvztyotquus
branch
3 times, most recently
from
June 29, 2026 14:41
e30e3ce to
58ff0dd
Compare
Alizter
force-pushed
the
push-mnvztyotquus
branch
from
July 1, 2026 13:27
58ff0dd to
dc5f606
Compare
Alizter
marked this pull request as ready for review
July 1, 2026 13:27
Alizter
force-pushed
the
push-mnvztyotquus
branch
4 times, most recently
from
July 8, 2026 20:40
79f021e to
45995c3
Compare
punchagan
self-requested a review
July 9, 2026 12:14
ElectreAAS
self-requested a review
July 9, 2026 16:42
A package in `dune.lock` can now name a workspace package in its `(depends ...)` field. Workspace install entries are materialised via the scoped install layout (ocaml#14373) and consed onto the lock-dir package build env, so the build action sees the workspace package the same way it sees any other declared dep. Previously such an edge was rejected at lock and validation time. This is the first step of the "in-and-out" case from ocaml#8652. `Lock_dir.read_disk{,_exn}` now take `~external_packages : Package_name.Set.t` and `validate_packages` accepts an edge whose target is in the lockdir, is dune, or is in `external_packages`, while rejecting ambiguous edges whose target appears both in the lockdir and in that external set. Workspace-driven callers populate the set from local package names; dev-tool lockdirs and the solver output check pass `empty`, preserving strict validation. `check_packages` becomes a public helper so callers can stage parsing and validation separately, and `Make_load.load` no longer validates -- the removed `load_exn` was equivalent to `load |> ok_exn`. `Pkg.t` and `DB.Pkg_table.entry` carry `workspace_deps : Package.Name.Set.t` next to the lock-dir-only `depends`. A new `Resolved_dep` variant classifies each declared edge as `Lockdir | Workspace | Dune | System | Unavailable_lockdir`; names that are not in the lockdir, dune, or the system-provided set are workspace candidates, and the lockdir validation path rejects candidates that are not real workspace packages before package rules consume them. Build actions, package variables, and binary resolution use the transitive workspace deps of the lock-dir dependency closure. Letting the solver itself pick workspace packages is a follow-up. Signed-off-by: Ali Caglayan <[email protected]>
Alizter
force-pushed
the
push-mnvztyotquus
branch
from
July 13, 2026 15:40
45995c3 to
2676f65
Compare
Alizter
marked this pull request as draft
July 13, 2026 19:00
Collaborator
Author
|
I've found some issues with some more complicated build graphs so marking as draft for now until I have resolved them. Reviews in the meantime are still welcome, but this is not finished. |
punchagan
reviewed
Jul 15, 2026
punchagan
left a comment
Contributor
There was a problem hiding this comment.
This generally looks reasonable to me. I'd be to happy to discuss and work through the issues you mentioned appearing with more complicated build graphs.
| Building rejects the lock dir because "myws" is a dependency of "mylock" but is | ||
| not itself a package in the lock dir. Lock-dir validation does not currently | ||
| recognise workspace packages as valid dependency targets. | ||
| The build accepts the workspace dependency and runs [mylock]'s build |
Contributor
There was a problem hiding this comment.
I didn't catch this in the previous PR merging these tests, but should this test be in lockdir-workspace-deps dir?
| lockdir but unavailable for the current platform. Validation accepts | ||
| the edge because the name exists somewhere in the lockdir, but rule | ||
| generation resolves against the current platform subset and | ||
| misclassifies the unavailable lockdir package as a workspace |
Contributor
There was a problem hiding this comment.
Comment here needs updation!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A package in
dune.lockcan now name a workspace package in its(depends ...)field. The workspace package's install entries are materialised via the scoped install layout (#14373) and consed onto the lock-dir package's build env, so the build action sees the workspace package the same way it sees any other declared dep. Previously such an edge was rejected at validation time.This is the first step of the "in-and-out" case from #8652.
Lock_dir.read_disk{,_exn}now take~external_packages : Package_name.Set.tandvalidate_packagesaccepts an edge whose target is in the lockdir, is dune, or is inexternal_packages. Workspace-driven callers populate the set from local package names; dev-tool lockdirs and the solver's own output check passempty, preserving strict validation.check_packagesbecomes a public helper so callers can stage parsing and validation separately (used by dev-tool loading insrc/dune_rules/lock_dir.ml), andMake_load.loadno longer validates — the removedload_exnwas equivalent toload |> ok_exn.Pkg.tandDB.Pkg_table.entrycarryworkspace_deps : Package.Name.Set.tnext to the lock-dir-onlydepends. A newResolved_depvariant classifies each declared edge asLockdir | Workspace | Dune | System; anything not found in the lockdir, dune, or the system-provided set falls toWorkspace.add_workspace_envbuilds anInstall_layoutfor the lock-dir package'sworkspace_depsand conses its env onto the build action.Related:
doc/dev/install-layouts.md— promote the "Lock-dir build layouts" future-work entry into the design body)Follow-up