3 ms·
For my Java projects, to support different environments - corp proxies, let's say - I have to have entire different gradle files, plugins, options, routing, it'
by nawgz 4y ago
For my Java projects, to support different environments - corp proxies, let's say - I have to have entire different gradle files, plugins, options, routing, it's just disgusting.
For my JS projects (obviously actually TS these days), I use the exact same config, it's parametrizable to take in one argument - the private registry to use.
It's amazing for really using. Unlike Java package managers.
- thrwawaies34 4y agoHave you tried using profiles? Maven supports build profiles. Spring and other frameworks also supports runtime profiles, where you can have a YAML file for each profile/environment
- nawgz 4y agoThe root of this thread is the person I responded to claiming NPM, as an easy-to-use package manager, would "become a double-edged sword that swings back at you" Meanwhile, you are having to tell me Java package management is actually better because... it has profiles I think that Java guys might have their heads too far up their asses
- kaba0 4y agoNo, we have just worked with huge enterprise applications for 20 years and attempted to get the build system right a few times already, learning from previous attempts — as opposed to creating some mess of ad-ridden (seriously — having terminal ads, are we crazy?!!), slow (windows literally chokes up on deleting the node_modules folder, which is not a rare operation), displaying some insane number of vulnerabilities no matter what, which is also due to having way too many too small packages, and every one bringing in a huge deal of other bullshit tiny dependencies. Oh, did you know that maven wasn’t hit by those dependency confusion attacks, being almost alone in that? Also, I can literally build a million lines repo faster than the frontend which is relatively small and just outputs goddamn js and css files..
- nawgz 4y ago> Also, I can literally build a million lines repo faster than the frontend which is relatively small and just outputs goddamn js and css files.. My UI type-checks, transpiles, and stores itself as an NGINX container or a static bundle on my CI in 1min10, so I'm going to go ahead and press X to doubt. > windows There's your problem!
- peterashford 4y agoThats just rude
- kaba0 4y agoGradle literally creates a configuration from a script, which it can later use to build the project. It is absolutely trivial to use different proxies in different environment based on env vars, local files, etc. Gradle is not too liked (android's overly complex builds probably give it a bad name), but it is an absolutely capable build system.
- nawgz 4y ago> It is absolutely trivial to use different proxies in different environment based on env vars, local files, etc. For something to be "absolutely trivial", you would expect the average user to be able to produce trivial-looking configuration. It is certainly not the case with any Java program I've seen which has to handle two build environments. On the other hand, all my NodeJS projects show absolutely no sign they had to be "adapted" to the second+ environment. But sure, we can pretend Java package management is up to snuff, just throw some more "it's trivial"-type aphorisms around
- ElectricalUnion 4y agoIME npm sucks even more that Java if you really need to change repositories ( not just proxy ). I was stuck under very old (and deprecated) versions of node and NPM, and at my $OLDJOB lockfiles were respected with a CI under restrictive proxy service and alternative npm repo. "delete lockfile, npm install everything again with correct repository under VPN" was a very recurring thing on every project where someone thought "it's just a npm install, what could go wrong?".