Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[setup] Bump fallback version #6

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

andreaskurth
Copy link

@andreaskurth andreaskurth commented Mar 21, 2024

When installing FuseSoC from OpenTitan -- that is, with

pip install -r python-requirements.txt

Pip currently gets instructed to download

https://github.com/lowRISC/fusesoc/archive/refs/tags/ot-0.5.zip

However, that downloaded version currently presents itself as version 0.4.dev0, to Pip as well as in fusesoc --version. This is problematic in at least two ways:

  1. Because Pip gets told that it downloaded version 0.4, it can prefer to use a locally cached archive (and I've seen it doing that!) that is really version 0.4, causing the update to become a NOP even though the user thinks they just updated FuseSoC.

  2. Users have no way of distinguishing between versions 0.4 and 0.5 from the command line, which makes debugging difficult.

I don't know the root cause for why use_scm_version doesn't work as expected, but this hotfixes the fallback version to the currently tagged version. We then need to update the Git tag to this commit and update the hash in the OpenTitan repo.

When installing FuseSoC from OpenTitan -- that is, with

    pip install -r python-requirements.txt

Pip currently gets instructed to download

    https://github.com/lowRISC/fusesoc/archive/refs/tags/ot-0.5.zip

However, that downloaded version **currently presents itself as version
`0.4.dev0`**, to Pip as well as in `fusesoc --version`.  This is
problematic in at least two ways:

1. Because Pip gets told that it downloaded version 0.4, it can prefer
   to use a locally cached archive (and I've seen it doing that!) that
   is *really* version 0.4, causing the update to fail even though the
   user thinks they just updated FuseSoC.

2. Users have no way of distinguishing between versions 0.4 and 0.5 from
   the command line, which makes debugging difficult.

I don't know the root cause for why `use_scm_version` doesn't work as
expected, but this hotfixes the fallback version to the currently tagged
version.  We then need to update the Git tag to this commit and update
the hash in the OpenTitan repo.
@andreaskurth andreaskurth self-assigned this Mar 21, 2024
@andreaskurth
Copy link
Author

CC @timothytrippel @a-will

@andreaskurth andreaskurth requested a review from GregAC March 21, 2024 14:01
@a-will
Copy link

a-will commented Mar 21, 2024

use_scm_version can only work if there actually is an SCM ;) The release tarballs are not git repos, and this fallback version probably ought to be replaced by a proper release GitHub Action.

If we could release a tarball that has the build results from the git repo (instead of just the source), then the version would be filled in during the build step.

@GregAC GregAC merged commit 78decf1 into lowRISC:ot-dev Mar 21, 2024
1 check passed
andreaskurth added a commit to andreaskurth/opentitan that referenced this pull request Mar 21, 2024
Prior to this commit, the FuseSoC version downloaded when running

    pip install -r python-requirements.txt

would identify itself as **version `0.4.dev0`** to Pip as well as in
`fusesoc --version`.  This is problematic in at least two ways:

1. Because Pip gets told that it downloaded version 0.4, it can prefer
   to use a locally cached archive (and I've seen it doing that!) that
   is *really* version 0.4, causing the update to become a NOP even
   though the user thinks they just updated FuseSoC.

2. Users have no way of distinguishing between versions 0.4 and 0.5 from
   the command line, which makes debugging issues that got fixed in
   version 0.5 difficult.

To work around this problem, the PR lowRISC/fusesoc#6 changed
`fallback_version`, from which our FuseSoC gets its version, to
`0.5.dev0`, and this version was subsequently tagged as such.  This
commit now updates our Python requirements to load the fixed version.

Run `pip install -r python-requirements.txt` after this commit has
landed to update FuseSoC to version `0.5.dev0` for good.

Signed-off-by: Andreas Kurth <[email protected]>
@andreaskurth andreaskurth deleted the bump-fallback_version branch March 21, 2024 20:04
andreaskurth added a commit to lowRISC/opentitan that referenced this pull request Mar 22, 2024
Prior to this commit, the FuseSoC version downloaded when running

    pip install -r python-requirements.txt

would identify itself as **version `0.4.dev0`** to Pip as well as in
`fusesoc --version`.  This is problematic in at least two ways:

1. Because Pip gets told that it downloaded version 0.4, it can prefer
   to use a locally cached archive (and I've seen it doing that!) that
   is *really* version 0.4, causing the update to become a NOP even
   though the user thinks they just updated FuseSoC.

2. Users have no way of distinguishing between versions 0.4 and 0.5 from
   the command line, which makes debugging issues that got fixed in
   version 0.5 difficult.

To work around this problem, the PR lowRISC/fusesoc#6 changed
`fallback_version`, from which our FuseSoC gets its version, to
`0.5.dev0`, and this version was subsequently tagged as such.  This
commit now updates our Python requirements to load the fixed version.

Run `pip install -r python-requirements.txt` after this commit has
landed to update FuseSoC to version `0.5.dev0` for good.

Signed-off-by: Andreas Kurth <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants