feat: relative directory usage type - #426
Merged
andrius-puksta-sensmetry merged 1 commit intoJul 29, 2026
Merged
Conversation
andrius-puksta-sensmetry
marked this pull request as draft
July 1, 2026 07:10
andrius-puksta-sensmetry
force-pushed
the
pr/usage-types-2
branch
from
July 1, 2026 10:40
bf8a126 to
2efe572
Compare
This was referenced Jul 2, 2026
Merged
andrius-puksta-sensmetry
force-pushed
the
pr/usage-types-2
branch
from
July 3, 2026 07:08
c4d77cd to
1b89d44
Compare
andrius-puksta-sensmetry
marked this pull request as ready for review
July 3, 2026 07:08
andrius-puksta-sensmetry
force-pushed
the
pr/usage-types-2
branch
from
July 3, 2026 11:00
1b89d44 to
db00459
Compare
Collaborator
Why are |
Collaborator
Author
|
Publisher and name are needed for a few reasons:
|
andrius-puksta-sensmetry
force-pushed
the
pr/usage-types-2
branch
5 times, most recently
from
July 10, 2026 05:51
666c174 to
7eee974
Compare
andrius-puksta-sensmetry
force-pushed
the
pr/usage-types-2
branch
5 times, most recently
from
July 21, 2026 05:45
786dbc3 to
e80189c
Compare
This was referenced Jul 21, 2026
andrius-puksta-sensmetry
force-pushed
the
pr/usage-types-2
branch
from
July 22, 2026 07:37
e80189c to
287a0fc
Compare
andrius-puksta-sensmetry
force-pushed
the
pr/usage-types-2
branch
from
July 22, 2026 07:50
287a0fc to
259ac39
Compare
vytautas-astrauskas-sensmetry
previously requested changes
Jul 23, 2026
andrius-puksta-sensmetry
force-pushed
the
pr/usage-types-2
branch
3 times, most recently
from
July 24, 2026 04:23
9a3fcd5 to
72a1497
Compare
andrius-puksta-sensmetry
force-pushed
the
pr/usage-types-2
branch
2 times, most recently
from
July 24, 2026 09:40
0ec3b97 to
5ae1ef4
Compare
andrius-puksta-sensmetry
force-pushed
the
pr/usage-types-2
branch
2 times, most recently
from
July 27, 2026 10:00
fd36317 to
2140046
Compare
andrius-puksta-sensmetry
force-pushed
the
pr/usage-types-2
branch
3 times, most recently
from
July 28, 2026 09:28
a4838fd to
e0fb0d3
Compare
Introduce the Directory variant on InterchangeProjectUsage for relative local path dependencies, threading it through the project layer, resolvers, pubgrub solver, CLI, and Java/Python bindings. Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com> fix: incorrect merge conflict resolution Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
andrius-puksta-sensmetry
force-pushed
the
pr/usage-types-2
branch
from
July 28, 2026 09:28
e0fb0d3 to
a9c0f9d
Compare
andrius-puksta-sensmetry
dismissed
vytautas-astrauskas-sensmetry’s stale review
July 28, 2026 12:17
requested changes done or split out into separate issues/PRs
vytautas-astrauskas-sensmetry
approved these changes
Jul 29, 2026
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.
This PR adds support for referencing local directory paths as project dependencies, alongside the existing IRI/URL-based usages.
New Directory usage type
A new usage variant references a project by a directory path (relative to the declaring project's root) plus its publisher and name. It serialises as
{"dir": ..., "publisher": ..., "name": ...}. The declared publisher/name must match what's actually found at the path, and there is no version constraint since a directory contains a single version. Onlylocal_srcprojects are supported; KPARs will use another type, to keep resolution unambiguous.Unlike legacy
resourceusages, where the IRI is both the project's identity and (possibly) its location, typed usages separate the two: identity is always publisher+name, and the source is explicit. This allows avoiding resolution altogether for typed usages. Currently resolution is still done due to large changes required to avoid it; typed usages always resolve to their type.Resolution and solving
Resolvers now receive the full usage (plus an optional base path for relative filesystem paths) instead of a bare IRI. Resolution outcomes distinguish "not found" from "unresolvable", letting a file-resolver miss fall through to other resolvers.
Every usage derives an identifier (a PURL where possible, an URN fallback otherwise; legacy usages keep their IRI). The solver identifies packages by this identifier rather than by version constraint or source, so a package referenced with different constraints/paths by different dependents appears only once in the solution.
experimentalCLI subcommandAdds
sysand experimental add --dir <path>andsysand experimental remove <publisher> <name>:addcomputes a path relative to the current project, reads publisher/name from the dependency, and adds a directory usage. By default it then locks and syncs (--no-lock/--no-syncopt out), rolling back the project file if resolution fails. No source overrides — typed usages will support everything overrides do, so they can be added directly instead.removeremoves a usage by publisher and name, which will work for all typed usage types.These are separate from regular
add/removeto avoid breaking changes, and because the UX for other usage types is still unclear.experimentalcommands will likely replace regular commands on next major release, but some accommodation to minimize breaking changes will be required.Other
Breaking changes
infono longer takes arelative_file_rootargument (it had no effect previously). Java code matching on usage types must also handle the new directory usage class.