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

0.9.22 regression : build/describe "--nodeps" fails to find local dependency #580

Closed
bruno-medeiros opened this issue Jun 5, 2015 · 7 comments
Milestone

Comments

@bruno-medeiros
Copy link

There seems to be a problem with 0.9.22 that causes --nodeps to not find local dependencies.

To reproduce:
Go to some test directory:

$ dub init lib
Successfully created an empty project in 'D:\devel\Scratchpad.D\DubWorkspace\lib'.
$ dub init test
Successfully created an empty project in 'D:\devel\Scratchpad.D\DubWorkspace\test'.
$ dub add-path .

Now modify test/dub.json to include this:

    "dependencies": {
        "lib" : "*",
    },

Now if we try to describe or build with "--nodeps", it fails, even though the dependency is seen by dub list:

$dub describe --nodeps
Error executing command describe:
Unknown dependency: lib
$dub build --nodeps
Error executing command build:
Unknown dependency: lib
$dub list
Packages present in the system and known to dub:
  lib ~master: D:\devel\Scratchpad.D\DubWorkspace\lib\
  test ~master: D:\devel\Scratchpad.D\DubWorkspace\test\

Doing a dub build without --nodeps works, and after doing so, --nodeps will work as well

@bruno-medeiros bruno-medeiros changed the title 0.9.23 regression : build/describe "--nodeps" fails to find local dependency 0.9.22 regression : build/describe "--nodeps" fails to find local dependency Jun 5, 2015
@bruno-medeiros
Copy link
Author

EDIT: seems like this regression is from 0.9.22 instead.

@s-ludwig
Copy link
Member

I think we need to add a second switch that only disables online access. Currently --nodeps really disables any dependency resolution functionality, so you need to at least have a valid dub.selections.json in addition to the local dependencies. Running dub upgrade --missing-only before building with --nodeps should achieve this without querying the online registry.

@Geod24
Copy link
Member

Geod24 commented Jun 10, 2015

I hit this one yesterday. Maybe --no-default-registry will be more generic ?

@bruno-medeiros
Copy link
Author

Running dub upgrade --missing-only before building with --nodeps should achieve this without querying the online registry

But dub upgrade --missing-only will query the online registry, if there are missing deps, correct? Sure, in the bug case I presented above it won't happen, because there are no missing dependencies, but that is not something I know a priori in the general case.

Basically I have a describe workflow (or rather DDT has) which should work like this:

  • Successfully complete the describe if all deps are available locally.
  • Fail if there are missing deps (does not attempt to download them).

This worked with dub describe --nodeps in DUB 0.9.21, but is not possible in later versions. (I can use another flag, that's not a problem, I just need a way to do it)

@s-ludwig
Copy link
Member

Yeah, if it has to it will still look for packages online with --missing only.

@Geod24 Good idea, Depending on the use case we might need a switch to completely disable network access, though (i.e. the default registry and any user defined one). So maybe --disable-registry=all and --disable-registry=default?

@s-ludwig s-ludwig added this to the 0.9.24 milestone Jul 12, 2015
@bruno-medeiros
Copy link
Author

EDIT: deleted, not applicable

@bruno-medeiros
Copy link
Author

Ignore my previous comment, turns out I was using derpily using the wrong DUB version.

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

3 participants