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

[Feature Request] Allow local/private dependencies for modules #526

Open
1 task done
codeworm96 opened this issue Dec 15, 2024 · 2 comments
Open
1 task done

[Feature Request] Allow local/private dependencies for modules #526

codeworm96 opened this issue Dec 15, 2024 · 2 comments

Comments

@codeworm96
Copy link

Feature Request

Summary

Currently, the moon add only accepts <author>/<package_name>[@<version>]: https://github.com/moonbitlang/moon/blob/main/crates/moon/src/cli/deps.rs#L78

But internally, the dependencies can be local or from git repo.
https://github.com/moonbitlang/moon/blob/main/crates/moonutil/src/dependency.rs#L28-L41

// Other optional fields...
/// Local path to the dependency. Overrides the version requirement.
pub path: Option<String>,
/// Git repository URL. Overrides the version requirement.
pub git: Option<String>,
/// Git branch to use.
pub git_branch: Option<String>,

Is there any plan to expose these two options to end user, to allow local/private dependencies?

Motivation

Common use cases for local dependencies are:

  • prototyping a new module before publishing to mooncakes
  • private modules that are not for opensource

Checklist

  • I have added all necessary details to make it easy for the maintainers to understand my request.
@codeworm96
Copy link
Author

It seems local deps are already usable, but git deps are not implemented. https://github.com/moonbitlang/moon/blob/main/crates/mooncake/src/resolver/mvs.rs#L394

@Young-Flash
Copy link
Collaborator

#107

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

No branches or pull requests

2 participants