dlang-community / setup-dlang

Github action for dlang compiler setup
MIT License
46 stars 14 forks source link

v1.0.5: Update dependencies #37

Closed Geod24 closed 3 years ago

Geod24 commented 3 years ago

Noticed the dependencies were quite out of date, especially for the cache-tools action.

PetarKirov commented 3 years ago

node_modules should not be committed. Please check the docs for more info:

TL;DR Add the package script to package.json from https://github.com/actions/typescript-action/blob/e849b574f4e0b705c43b503509c07a5c606d8931/package.json#L12, delete node_modules and then run this script to compile and link / bundle all dependencies in a single .js file via ncc.

Geod24 commented 3 years ago

So we've been doing it wrong all along ? :)

mihails-strasuns commented 3 years ago

@PetarKirov we are not using proposed model, it is extremely impractical for maintaining multiple stable branches - and makes using non-released action version a major PITA. So in case of setup-dlang node_modules must be committed, that is intentional.

Edit: switching to committing a bundled version instead is a good idea though, we definitely should do that.

mihails-strasuns commented 3 years ago

@Geod24 seems to have some cert issue now: Error: unable to verify the first certificate

Geod24 commented 3 years ago

@Geod24 seems to have some cert issue now: Error: unable to verify the first certificate

Yes it's an upstream issue with dlang.org and actually one of the reason I looked into dependencies. install.sh isn't working either ATM.

mihails-strasuns commented 3 years ago

Can we hold this PR until the upstream issue is fixed? Would prefer to be confident it doesn't break anything ;)

Geod24 commented 3 years ago

Ah yes, obviously, I had no intent to merge it while the CI is red.

PetarKirov commented 3 years ago

@mihails-strasuns

Edit: switching to committing a bundled version instead is a good idea though, we definitely should do that.

Yes, I meant that we should use ncc, instead of commiting node_modules, while keeping the same branching strategy we've been using already.

PetarKirov commented 3 years ago

The best solution is to publish the "compiled" artifacts as an npm package either on npmjs.com, or on a GitHub NPM registry.

P.S. I registered @dlang org on npmjs.com for purposes like this:

image

In order to avoid fiascos such as:

Of course, my intention is that @dlang npm org should be controlled by the D community (or perhaps specifically DLF), but for now you can just ping me on dlang.slack.com and I will help whoever wants to setup some D-related package.

See also: https://github.com/dlang/dub/issues/2076

Edit: I checked the docs and it seems that GitHub is set on its NIH ways, instead of using standard and established solutions, so I guess commiting the ncc-produced artifacts is still the way to go.

mihails-strasuns commented 3 years ago

👍