-
Notifications
You must be signed in to change notification settings - Fork 19
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
Multiple packages in one repo. #37
Comments
I did some initial work on a POC for this, in #38, but now I realize that assuming that every path ends with I am also wondering how these changes will affect the meta data in the vessel-package-set repo. Some experimenting indicates that the Dhall type in file
to this
and likewise, the dhall meta data may need to include |
Updated #38 to relax this design decision. I am also noticing that others are affected by the |
I'd love to see support for this! 💯 Q: What would be the difference between the following package structures:
// e.g.
// src/SubPkg1/Module1.mo
// src/SubPkg1/Class1.mo
// src/SubPkg2/ClassX/lib.mo
import Module1 "mo:pkg/SubPkg1/Module1"
import Class1 "mo:pkg/SubPkg1/Class1"
// ...
import ClassX "mo:pkg/SubPkg2/ClassX
// e.g.
// pkg1/src/Module1.mo
// pkg1/src/Class1.mo
// pkg2/src/ClassX/lib.mo
import Module1 "mo:pkg1/Module1"
import Class1 "mo:pkg1/Class1"
// ...
import ClassX "mo:pkg2/ClassX Are there any advantages? Is one better than another? I think the 2nd one is much cleaner than the first, but it just introduces another way to 'do the same'? |
@di-wu, I'd think the difference is that 2 makes them two distinct packages, which means clients can install them independently, they can be versioned independently, and so on. The ability to decouple is valuable. |
Great! I've got over 30 Motoko packages piled up, this'd help for sure! |
Vessel uses |
As an example, suppose one repo has two packages, Then, I agree that this is non-intuitive since each package somehow "deserves" an independent timeline, but must instead share one with the other packages in its repo. But OTOH, that's what it means to share a repo. |
We discussed wanting a new
vessel
feature to support multiple packages in one repo.In particular, we'd like to continue to use
vessel
but have it supportbase
library (back) into the mainmotoko
repository.base
library into platform-independent parts (data structures) and IC-specific parts.To support 1 and 2, we'd like to refine how vessel works so that a package is located not only by a
repo
, but instead by a pair of fields,repo
andpath
, and thepath
specifies where within thatrepo
one finds the vessel config files and thesrc
directory for the package.If the
path
field is absent, it is assumed to be the empty path, meaning that therepo
has only one package, at its root (the current design).Then, we'd have the
motoko
repo organized like this (simplified), assuming that thecompiler
andbase
andic
directories represent the code now in themotoko
repo andbase
repos, but reorganized:cc @rossberg @crusso
The text was updated successfully, but these errors were encountered: