atlas icon indicating copy to clipboard operation
atlas copied to clipboard

No longer respects `--deps`

Open beef331 opened this issue 1 year ago • 3 comments

Presently the following results in micros being installed in the workspace directory instead of .deps.

mkdir workspace
cd workspace
atlas init  --deps=".deps"
atlas use micros

Looking at the atlas.workspace file deps is not populated:

{
  "deps": "",
  "overrides": "",
  "plugins": "",
  "resolver": "SemVer",
  "graph": null
}

Even if one populates deps:".deps" using atlas use micros still installs it in the workspace root.

beef331 avatar Feb 04 '24 00:02 beef331

Looking at the atlas.workspace file deps is not populated

At least for why it's missing in the first place is likely an oversight writing the default config which is a simple fix.

https://github.com/nim-lang/atlas/blob/c711d8ec92f65f08f1c53a2ab0aa48d4e61bead6/src/atlas.nim#L251-L257

https://github.com/nim-lang/atlas/blob/c711d8ec92f65f08f1c53a2ab0aa48d4e61bead6/src/confighandler.nim#L54-L57

The JsonConfig initialization should probably include deps: c.depsDir

daylinmorgan avatar Feb 06 '24 17:02 daylinmorgan

Looking at the atlas.workspace file deps is not populated

At least for why it's missing in the first place is likely an oversight writing the default config which is a simple fix.

https://github.com/nim-lang/atlas/blob/c711d8ec92f65f08f1c53a2ab0aa48d4e61bead6/src/atlas.nim#L251-L257

https://github.com/nim-lang/atlas/blob/c711d8ec92f65f08f1c53a2ab0aa48d4e61bead6/src/confighandler.nim#L54-L57

The JsonConfig initialization should probably include deps: c.depsDir

Hey, thanks. That's probably it. I don't see a PR yet, so I'll create one for it. I just noticed the same issue trying to use it.

elcritch avatar Feb 21 '24 03:02 elcritch

Hey, thanks. That's probably it. I don't see a PR yet, so I'll create one for it. I just noticed the same issue trying to use it.

Sounds good! I haven't looked in depth on the second part of the issue in getting atlas to actually use the --deps, might be a similar issue setting up the config object on load.

daylinmorgan avatar Feb 21 '24 03:02 daylinmorgan

I'm working on fixing this but need to know the desired behavior. If I do:

atlas init --deps=deps
atlas new myproj
cd myproj && atlas use micros

I would personally expect micros and all dependencies to be in deps/ and NOT myproj/deps/. Is that everyone else's understanding?

iffy avatar Aug 08 '24 15:08 iffy

That is I believe the intended behaviour. The deps is relative to the atlas directory not subfolders.

beef331 avatar Aug 08 '24 22:08 beef331