-
Notifications
You must be signed in to change notification settings - Fork 14
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
Implement better "vendor" style workspace setup #104
Comments
I don't disagree with what you said but keep in mind that every single project/dependency can be in a custom directory and |
I'll keep it in mind. Though hopefully these wouldn't be mixed.
Yes, that's a good point. I've gone back and forth between setting up an However, it'd be nice in that scenario to use project X's "default" workspace only if there's no parent workspace. That would allow one to use the project inside a normal workspace. I think that'd require a setting in Does that seem last setup seem reasonable to you? |
I don't understand it. What is a "parent" workspace? These cannot be nested currently. |
Why couldn't a workspace be nested? Atlas should find the closest workspace and just use that. They're not nested in the sense that it does anything special. At least one person noted in the issues on here that they used nested workspaces. I've also done nested workspace just to reuse a folder layout I already had, but wanted workspaces in them too. The main proposal I'm suggesting here is to add support for a special case nested workspace for dealing with projects that want to define a "default" workspace. Here's the driving usage scenarios:
Both of these scenarios will probably be fairly common. Being able to support either setup without friction will make usage experience nicer for either usage scenario. It might seem a bit overkill, but they'll very likely be very common patterns. That's especially true when you're jumping around a bunch of repos. |
Myself and several others have used the "vendoring" style where a sub-directory is used as the Atlas workspace. This is a very common pattern for many language package managers like Npm or Elixir's mix and each project can have it's own versions checked out. Golang also uses a vendor directory for project specific deps pinning in addition to it's global
GOPATH
workspace.For many projects it's convenient to setup the main parent repo as a Nim project that also contains the configs to install dependencies for that project rather than needing to create an explicit workspace. Often this is most useful for folks who want to clone a repo, install the deps locally and try out a project. This is pretty big for people who see a Nim project and just want to "try it out". Though this can be handy for a user who has a workspace but doesn't want to pollute it with some project's dependencies before they check it out. Lastly, it also enables a smooth transition path for Status project which use the nimbus-build-system that uses git submodules in a
vendor
folder.The previous implementation of this in Atlas was very hacky and searched directy subdirectories in the current folder for workspaces in normal workspaces weren't found. That's problematic for lots of reasons and caused issues with normal atlas workspaces containing other workspaces. However, there should be a couple of solutions to enabling a vendoring style setup with Atlas properly.
Here's a couple of feature goals:
./vendor
folderHere's a few approaches that have come up in a previous PR and I've thought of trying:
atlas.config
project config file which could specify a default vendored workspace subdirectory in addition to other per-project configsatlas.vendor
file that just contains the path to a vendor folder (similar to some of git's setups)atlas.workspace
configuration that specifies a vendored workspaceatlas --workspace=./vendor xyz
-l
uses a pre-defined folder likevendor
as the workspace, similar to theatlas -g
support for globalI'm partial towards either option 1 or option 5 of having an
atlas.config
or a-l
local option, respectively. They're both explicit.Having a workspace config in the current project seems sort of confusing with Atlas's standard usage. The
atlas.vendor
link file are sort of annoying in Nimble and Git.The text was updated successfully, but these errors were encountered: