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
Single-file packages #103
Comments
Forgot to mention: I've made a basic comment on the forum. I'll try and sit down to properly think about it in the coming days. The spam detection situation has been improved and there are at least much less false positives. |
You should be really able to just run #!/usr/bin/env dub
/* PACKAGE_CFG
{
"dependencies" : {
"vibe-d": ">=0.7.11"
}
}
*/
import vibe.d;
void handleRequest(HTTPServerRequest req,
HTTPServerResponse res)
{
res.writeBody("Hello, World!", "text/plain");
}
shared static this()
{
auto settings = new HTTPServerSettings;
settings.port = 8080;
listenHTTP(settings, &handleRequest);
} |
It's nice-to-have feature. I really like it! |
Anyone working on this? |
Not aware of anyone. BTW, considering the pending SDL format implementation, it would be good to encode the format in the comment, for example |
I know I keep harping on it, but this option would not be a problem if dub packages had the ability to tell dub "Don't compile any of my files that aren't actually imported, rdmd-style". For MANY packages, the extra build time involved would be trivial. Larger packages that have longer compile times would NOT be under any obligation to to actually use this option and could freely stick with the current "all files" behavior. |
(Note: I'd post it to the newsgroup, but issue #8 prevents me)
Problem
When dealing with large libraries including multiple files, sub-packages, and so on, dub is well-designed and easy to use. There is one target audience, however, where the user interface could be simpler: packages with only a single file.
The current choice offered is either to make one repository for every single-file package (e.g. my own
embd
), or to lump together several often unrelated packages into one repo (e.g. the greatarsd
). The former option is clunky, and the latter requires users to download and compile several modules they won't need. Another option is needed.Solution
An SFP is a folder named
example
with a single file inside namedexample.d
(not including.git
, etc). Somewhere in the file will be a comment like so:This file could be automatically generated by:
Questions
Here's some additional ideas:
sfp/[name]
in the repository?example.d -> example/example.d
School's about to start, so I'll be slow, but I'm willing to work on it.
Thoughts?
NMS
The text was updated successfully, but these errors were encountered: