oyvindberg / bleep

A bleeping fast scala build tool!
MIT License
150 stars 22 forks source link

Change default behaviour of build update-deps to ignore milestones. #393

Open KristianAN opened 4 months ago

KristianAN commented 4 months ago

Currently when running bleep build update-deps it will update from non-milestone to milestone (possibly also RC?). In almost all cases this is not wanted behaviour. The default should be to update to the newest non-milestone/RC version. Maybe add a flag that can override this and just update to the newest whatever not-snapshot.

Already defined milestones/RC should update to latest milestone/RC

oyvindberg commented 4 months ago

Also note that this would be a fantastic place to start to write an interactive interface so users can cherry-pick the updates they want, control if they want to just bump all minor versions, and control which major versions to bump .

KristianAN commented 3 months ago

I am currently looking at the code in scala-steward and have started cooking together something for bleep and these are some initial thoughts.

How would something like this be as a start? bleep build update-deps --patch (-p) Only update patch versions

bleep build update-deps --minor (-m) Updates to latest minor for the current major if possible. Updates to latest patch if no new minor version

bleep build update-deps --latest (-l) (this should be the default?) Updates to latest major version if possible. Updates to latest minor if no new major, and again if no new minor updates to latest patch.

It the current version is a milestone or RC or similar it will just follow the same scheme.

Handling non-standard cases

This is the M, RC, BETA, SNAP, SNAPSHOT, hash and probably more(?) cases. Should the user be able to upgrade to these using the cli? If so we could add flags that permit it, but should these be added for every case? This is certainly where the interactive interface would be the best fit.

One easy thing to do as a start is output a list of the dependencies and possible newer non-standard versions after running update-deps.

oyvindberg commented 3 months ago

I like --patch and so on.

How about a --latest-including-milestones to accept any weird suffix?

Also note that it's not critical for this functionality to be 100% correct - it's easy for the user to manually override things in the yaml file

nafg commented 3 months ago

Perhaps to include non-releases the flag should be --unstable or --all.

P.S. Speaking of Scala Steward, does it support Bleep? If not, perhaps support could be added -- and to Renovate. Since Bleep uses a static config file, it should be easy for other dependency updaters to add support.

Another thing -- what about updating the Scala version? Scala Steward and sbt dependencyUpdates do this.

oyvindberg commented 3 months ago

Yes to all the above @nafg - we should have all that. And bumping JVM versions as well while were at it.

Id like to think that it would be easy enough to implement. Maybe except for Scala versions in cross build projects