atlas icon indicating copy to clipboard operation
atlas copied to clipboard

Readme example does not work.

Open treeform opened this issue 2 years ago • 8 comments

atlas use malebolgia
[Info] (.) is the current workspace
[Info] (malebolgia) could not resolve by name or repo; searching GitHub
[Error] (malebolgia) package not found by github search
[Warning] (malebolgia) cannot resolve package name

I expected malebolgia to be found. I expected the readme to have a package that is easy to find.

treeform avatar Aug 03 '23 22:08 treeform

Using another package like atlas use pretty works though.

treeform avatar Aug 03 '23 22:08 treeform

That's a regression. Malebolgia is not in packages.json but should be found regardless. Ping @elcritch

Araq avatar Aug 04 '23 03:08 Araq

I can't replicate it on my end.

@treeform are you on the latest version? If not I'd recommend updating, using nimble nimble install https://github.com/elcritch/atlas@\#head or the latest master if you manually installed it.

If that still fails could you run it with atlas --verbose:debug use malebolgia?

elcritch avatar Aug 04 '23 05:08 elcritch

I build atlas from source (following readme examples). When trying to update git says "Already up-to-date." So I think I am on #head with "Submodule tweaks (#58)".

I think you mean verbosity?

PS C:\p> ./atlas/src/atlas --verbosity:debug use malebolgia
[Info] (.) is the current workspace
[Debug] (fillPackageLookupTable) initializing...
[Trace] (malebolgia) resolving package
[Debug] (malebolgia) resolvePackageName: searching for package name: malebolgia
[Info] (malebolgia) could not resolve by name or repo; searching GitHub
[Error] (malebolgia) package not found by github search
[Debug] (malebolgia) dependencyDir: check: pth:  cd: C:\p ws: C:\p
[Debug] (malebolgia) dependencyDir: not found: C:\p\malebolgia
[Debug] (malebolgia) dependencyDir: not found: C:\p\malebolgia
[Debug] (malebolgia) dependencyDir: not found: C:\p\malebolgia
[Debug] (malebolgia) dependencyDir: not found: C:\p\malebolgia
[Trace] (malebolgia) dependency not found using default
[Debug] (malebolgia) findNimbleFile: searching: malebolgia path: C:\p\malebolgia dir: C:\p\malebolgia curr: C:\p\malebolgia\malebolgia.nimble
[Debug] (malebolgia) findNimbleFile: not found: C:\p\malebolgia\malebolgia.nimble
[Debug] (malebolgia) resolvePackageName: nimble: not found: Package(name:malebolgia, repo:malebolgia, url:, p:C:\p\malebolgia, x:false, nbl:)
[Warning] (malebolgia) cannot resolve package name

treeform avatar Aug 04 '23 15:08 treeform

Thanks! Yes I keep forgetting it's verbosity despite adding it.

Ok, I replicated the issue. malebolgia has been added in packages.json. You must have an older packages. It must be why the tests aren't finding it either.

I'll see about getting a fix up. Also @Araq maybe we need a test specific repo for testing that's not added to packages.json for testing the GitHub search?

elcritch avatar Aug 04 '23 20:08 elcritch

Alright... so it's not an Atlas problem. Apparently GitHub doesn't think you write enough Nim code @araq :P

image

As in curl https://api.github.com/search/repositories\?q\=malebolgia+language:nim doesn't provide any results, while curl https://api.github.com/search/repositories\?q\=malebolgia does.

I'm working on adding some improvements, but not sure the best way to handle the GH search issue.

elcritch avatar Aug 04 '23 21:08 elcritch

Nice, Araq is the most prolific HTML programmer!

treeform avatar Aug 04 '23 22:08 treeform

@treeform I made a PR that uses a fallback search to get around the issue if you care to try it: https://github.com/nim-lang/atlas/pull/62

elcritch avatar Aug 04 '23 23:08 elcritch