4 ms·
I dunno, importing from a url seems really smart and practical to me. It divorces the run-time (Deno) from a package manager (like npm). I wonder how it handles
by jonny_eh 8y ago
I dunno, importing from a url seems really smart and practical to me. It divorces the run-time (Deno) from a package manager (like npm). I wonder how it handles dependencies though.
- pknopf 8y agoIt sounded as if he just wants everyone to use Parcel. Even then, you would use npm/yarn to get your dependencies before bundling. It sounds like he doesn't want me runtime to handle dependencies at all. You can always reference urls with version numbers present in them.
- iamleppert 8y agoIs it synchronous? Does it follow redirects? What happens in a 404 situation? Does it obey cache headers? What happens when a timeout occurs or the resource isn’t code? What happens with recursive dependencies and other edge cases as a result of not knowing the dependency tree until runtime? What about error handling and recovering from these failures at runtime or compile time? Should all resources be secure? How does it work when you are developing on one of those dependencies? Do you have to run a local web server? How does versioning work? Where is the cache stored and is it content addressable? How to clear it? Is it global or per user? I could go on but you get the idea. A package manager is not simple and requires A LOT of choices. The best one I’ve seen is old CPAN.
- fredsted 8y agoDoesn't Go use URLs? How did they solve all these issues?
- kristoff_it 8y agoIt doesn't, it uses $GOPATH. The packages are downloaded using `go get` in a directory structure that mimics the full url: ./github.com/user/repository/...
- inimino 8y agoThe Web has all of these issues and yet importing JS libraries this way has worked just fine. Obviously it's not what you should do if you are publishing a library for others to use, but for local use, and the kinds of exploratory scientific computing he was talking about, it sounds perfect.
- pitaj 8y agoIt has _not_ worked "just fine" which is why we have bundlers, minifiers, and other build systems.
- inimino 8y agoWe have those things as a result of having too much code pulled in from too many sources. This has approximately nothing to do with URLs as identifiers, which is one of the foundations of the Web.
- rmrfrmrf 8y agoThe main problem is that URLs offer even fewer immutability guarantees than package management servers do, plus they're even easier to 1) break and 2) attack.