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

Dependency specification without version constraint #1205

Closed
taichi-ishitani opened this issue Jan 17, 2025 · 2 comments · Fixed by #1206
Closed

Dependency specification without version constraint #1205

taichi-ishitani opened this issue Jan 17, 2025 · 2 comments · Fixed by #1206
Labels
tools Tools feature

Comments

@taichi-ishitani
Copy link
Contributor

In case of specifying dependencies on local storage, such dependencies may be under development and version control is not suitable for them.
I think it would be nice to allow to specify such dependencies without version constraint and import existing source files in the dependencies as is.

@dalance dalance added the tools Tools feature label Jan 17, 2025
@dalance
Copy link
Collaborator

dalance commented Jan 17, 2025

I thought an actual workflow like below:

  • develop a project using local path dependency
  • publish the dependency project by new version
  • publish the project by new version

In this case, both local path and version is required.
So the following specification is probably reasonable.

[dependencies]
"https://github.com/veryl-lang/sample" = { version = "0.1.0", path = "../../sample" }

This means "If path exists, it is used as is, and if not, version is used from the source repository".

@dalance
Copy link
Collaborator

dalance commented Jan 20, 2025

I implemented this feature at #1206.
Now the following path specification can be used.

[dependencies]
"https://github.com/veryl-lang/sample" = { version = "0.1.0", path = "../../sample" }
"../../sample"                         = { version = "0.1.0", path = "../../sample" }

In this PR, there are the following restrictions:

  • left-hand side URL/path is mandatory. It should be valid git repository.
  • version is mandatory. It should be published.

These restrictions are required to keep consistency with the existing lockfile system.
How about it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Tools feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants