Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Publish Dated SNAPSHOTs #2591

Draft
wants to merge 3 commits into
base: master-deprecated
Choose a base branch
from
Draft

Publish Dated SNAPSHOTs #2591

wants to merge 3 commits into from

Conversation

jackkoenig
Copy link
Contributor

The intent is that once these are being published, chisel3 can find the latest dated SNAPSHOT and then publish itself against it.

Contributor Checklist

  • [NA] Did you add Scaladoc to every public function/method?
  • Did you update the FIRRTL spec to include every new feature/behavior?
  • Did you add at least one test demonstrating the PR?
  • Did you delete any extraneous printlns/debugging code?
  • Did you specify the type of improvement?
  • Did you state the API impact?
  • Did you specify the code generation impact?
  • Did you request a desired merge strategy?
  • Did you add text to be included in the Release Notes for this change?

Type of Improvement

  • release automation

API Impact

No impact

Backend Code Generation Impact

No impact

Desired Merge Strategy

  • Squash

Release Notes

Begin published dated SNAPSHOTs

Reviewer Checklist (only modified by reviewer)

  • Did you add the appropriate labels?
  • Did you mark the proper milestone (1.2.x, 1.3.0, 1.4.0) ?
  • Did you review?
  • Did you check whether all relevant Contributor checkboxes have been checked?
  • Did you mark as Please Merge?

@jackkoenig jackkoenig added this to the 3.5.x milestone Jan 13, 2023
Comment on lines +18 to +21
if (doDatedSnapshot.isDefined) {
val basicFormat = java.time.format.DateTimeFormatter.BASIC_ISO_DATE
val date = java.time.LocalDate.now().format(basicFormat)
s"$major-$date-SNAPSHOT"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be a lot better if the date were derived from the commit hash so that we don't have old commits pushing over today's date. I also think the BuildInfo should include the commit hash so that users can check this info.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use git describe --tag or some variation of this to get <latest-tag>-<new-commits>-g<git-hash> instead of the date?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we include the commit hash, it will publish a SNAPSHOT for every commit whereas I was trying to just have 1 per day. To keep the number of snapshots down we could instead put it on a "nightly" trigger, but that makes downstream projects more annoying to do because you want to make sure they publish their nightly SNAPSHOT after and upstream dependencies do. Just sticking with a dated one makes that a little bit simpler.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every commit can be useful as you are known to be pinned to something obvious. Nightly is annoying because it's a question of when (have to check the cron job to see when nightly is defined). FWIW: here are the commit hash snapshots for sifive/chisel-circt: https://oss.sonatype.org/content/repositories/snapshots/com/sifive/chisel-circt_2.13/ This has been useful in the past.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants