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

Configuration "library-nonet" is broken #1558

Closed
0xEAB opened this issue Sep 7, 2018 · 13 comments
Closed

Configuration "library-nonet" is broken #1558

0xEAB opened this issue Sep 7, 2018 · 13 comments

Comments

@0xEAB
Copy link
Contributor

0xEAB commented Sep 7, 2018

System information

  • dub version: v1.11.0
  • OS Platform and distribution: GNU/Linux 4.18, Ubuntu 18.04
  • compiler version: DMD64 D Compiler v2.081.2

Bug Description

dub 1.11.0: building configuration "library-nonet"...
../../.dub/packages/dub-1.11.0/dub/source/dub/packagesuppliers/maven.d(12,9): Error: module `dub.internal.utils` import HTTPStatusException not found
../../.dub/packages/dub-1.11.0/dub/source/dub/packagesuppliers/registry.d(14,9): Error: module `dub.internal.utils` import HTTPStatusException not found
dmd failed with exit code 1.

or

dub 1.11.0: building configuration "dynamic-library-nonet"...
../../.dub/packages/dub-1.11.0/dub/source/dub/packagesuppliers/maven.d(12,9): Error: module `dub.internal.utils` import HTTPStatusException not found
../../.dub/packages/dub-1.11.0/dub/source/dub/packagesuppliers/registry.d(14,9): Error: module `dub.internal.utils` import HTTPStatusException not found
/usr/bin/dmd failed with exit code 1.

How to reproduce?

    "dependencies": {
        "dub": "~>1.11.0"
    },
     "subConfigurations": {
         "dub": "library-nonet"
     }

or

    "dependencies": {
        "dub": "~>1.11.0"
    },
     "subConfigurations": {
         "dub": "dynamic-library-nonet"
     }

Expected Behavior

The said configuration can be used without breaking the package.

@0xEAB
Copy link
Contributor Author

0xEAB commented Sep 7, 2018

Workaround

"subConfigurations": {
        "dub": "library"
     }

@andre2007
Copy link
Contributor

@s-ludwig I am not really sure how to solve this.
HTTPStatusException is either introduced by version DubUseCurl or Have_vibe_d_http.

Is library-nonet still relevant? What should be the proposed solution?

  • HTTPStatusException is also always introduced
  • Package supplier maven & registry are not available for library-nonet
  • Coding using HTTPStatusException is deactivated if library-nonet is used
  • Remove library-nonet
  • ...

@andre2007
Copy link
Contributor

I tried it with dub-docs (https://github.com/dlang/dub-docs) which also uses "library-nonet" and set dub version to "~master". There is no syntax error.
Is the issue still reproducible for you with master?

@0xEAB
Copy link
Contributor Author

0xEAB commented Oct 20, 2018

unfortunately, not working here.
(You might have forgotten to dub upgrade?)

Fetching dub ~master (getting selected version)...
WARNING: A deprecated branch based version specification is used for the dependency dub. Please use numbered versions instead. Also note that you can still use the dub.selections.json file to override a certain dependency to use a branch instead.
Performing "debug" build using /usr/bin/dmd for x86_64.
dub ~master: building configuration "library-nonet"...
../../.dub/packages/dub-master/dub/source/dub/packagesuppliers/maven.d(12,9): Error: module `dub.internal.utils` import HTTPStatusException not found
../../.dub/packages/dub-master/dub/source/dub/packagesuppliers/registry.d(14,9): Error: module `dub.internal.utils` import HTTPStatusException not found
/usr/bin/dmd failed with exit code 1.

@0xEAB
Copy link
Contributor Author

0xEAB commented Oct 20, 2018

@Geod24
Copy link
Member

Geod24 commented Dec 18, 2019

The bug report is still valid. To work around it, dub itself download vibe-d. See the CI script.
I'm not sure what the intent of library-nonet is either.

Package supplier maven & registry are not available for library-nonet

That's not an option, as one might have a local (on disk) Maven package supplier.
EDIT: Actually, the code doesn't seem to support this, there's an assert(false) in download.
I'd be in favor of always having HTTPException, or removing nonet. I think the former is a simple fix.

@0xEAB
Copy link
Contributor Author

0xEAB commented Dec 18, 2019

I'm not sure what the intent of library-nonet is either.

It would allow you to use the build system features without all the networking bloat.

@wilzbach
Copy link
Member

It would allow you to use the build system features without all the networking bloat

No. Nonet is stands for a dub build without curl, but vibe-http (pure D). This is advantageous if you need to build dub for a system where obtaining curl is hard or you need to build a fully statically linked library.

@Geod24
Copy link
Member

Geod24 commented Dec 19, 2019

Nonet is stands for a dub build without curl, but vibe-http (pure D).

Do you know why the vibe-http dependency is marked as optional ?

@wilzbach
Copy link
Member

Maybe because of a bug which otherwise would require it being downloaded even for the default build?

@Geod24
Copy link
Member

Geod24 commented Dec 19, 2019

Yeah, we really need to fix this one.

@0xEAB
Copy link
Contributor Author

0xEAB commented Dec 19, 2019

No.

Naming that config nonet is horribly misleading then.

@Geod24
Copy link
Member

Geod24 commented Oct 28, 2022

Fixed by #2509

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

4 participants