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

importing from Internet #373

Closed
katahiromz opened this issue Jul 12, 2014 · 2 comments
Closed

importing from Internet #373

katahiromz opened this issue Jul 12, 2014 · 2 comments

Comments

@katahiromz
Copy link

Could you support "importing from Internet" feature? I think
that'll be very convenient.

import "http://example.com/MyLibrary.d";

@nomad-software
Copy link

@s-ludwig
Copy link
Member

The closest thing that is planned to be supported is enabling single-file projects to embed their package description in the source file (#103). This could look similar to this:

/*!DUB
  dependencies: {"somedep": "~>1.0.0"}
*/
void main()
{
   somedepFunc("Hello, World");
}

Supporting arbitrary URLs for the "path" attribute of dependencies (#50) would then also enable

/*!DUB
  dependencies: {
    "somedep": {"path": "http://example.com/somedep/"}
  }
*/
void main()
{
   somedepFunc("Hello, World");
}

But this would only work for projects consisting of a single source file. For larger projects, it would just be a lot cleaner to aggregate dependencies in one place, so that it remains easy to see what is going on.

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