Replies: 2 comments 5 replies
-
You don't even need that much really - dub's silly insistence on having a million import paths can be bypassed if you extract the files and add them to a single location. This is what the opend extractor does to build the packaged libraries here. Then I still need to clean it up so you can use it locally to add more stuff to it, but there's some of the result in the CI build right now - do a ldc2 -i with the opend build and quite a few dub libs already just work. But yeah, I'm sure there's stuff missing right now and we'll eventually need to work toward something more like what you have there, so thanks for the link! |
Beta Was this translation helpful? Give feedback.
-
Sorry to necropost but it's better late than never. $ opend app.d $(dub describe observable --data=import-paths | tr -d "'") It kinda works, but without local dub.json I have no immediate visiblity of what deps of what versions a project has. The general idea of package manager is not bad, and declarative dependencies are not bad. Be it dub, npm, cargo or whatever. I know dub gets a lot of flak and has done some debatable choices, but please don't throw the baby out with the bathwater here. |
Beta Was this translation helpful? Give feedback.
-
I've been saying for a very long time that D should find better ways to use external libraries from a program. This weekend I wrote up a lengthy blog post showing how it can be done, including a basic, non-production implementation (I had been using a Linux shell script earlier but it was way easier writing this implementation in D). Here's the post:
https://bachmeil.github.io/the-blog/2024/02/14/no-dub-build.html
The brief version is that Dub does a lot more than just build programs with dependencies on the Dub registry. By adding a line like
to your program, the compiler can use Dub to figure out which source files and shared libraries to add to the compilation command. I didn't waste my time proposing this upstream because I know the reception it would get. I did talk a bit about this here earlier, so I'm providing more details in case there's interest in it.
Beta Was this translation helpful? Give feedback.
All reactions