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

Fix Update GHC workflow #2258

Merged
merged 3 commits into from
Nov 18, 2024
Merged

Fix Update GHC workflow #2258

merged 3 commits into from
Nov 18, 2024

Conversation

avdv
Copy link
Member

@avdv avdv commented Nov 15, 2024

The workflow failed for a few weeks because of an error:

 Traceback (most recent call last):
  File "/home/runner/work/rules_haskell/rules_haskell/haskell/gen_ghc_bindist.py", line 11, in <module>
    from distutils.version import StrictVersion
ModuleNotFoundError: No module named 'distutils'

The distutils module is deprecated since Python 3.10 and has been removed in Python 3.12 now.

Apparently, this workflow is using Python 3.12 since the nixpkgs registry entry by default refers to
"github:NixOS/nixpkgs/nixpkgs-unstable".

This change uses the packaging.version module instead, switching to nix-shell to make use of the
nixpkgs revision that is configured in nixpkgs/default.nix and to provide the packaging pip package.

The workflow failed for a few weeks because of an error:
```
 Traceback (most recent call last):
  File "/home/runner/work/rules_haskell/rules_haskell/haskell/gen_ghc_bindist.py", line 11, in <module>
    from distutils.version import StrictVersion
ModuleNotFoundError: No module named 'distutils'
```

The `distutils` module is deprecated since Python 3.10 and has been removed in Python 3.12 now.

Apparently, this workflow is using Python 3.12 since the `nixpkgs` registry entry by default refers to
"github:NixOS/nixpkgs/nixpkgs-unstable".

This change uses the `packaging.version` module instead, switching to `nix-shell` to make use of the
nixpkgs revision that is configured in `nixpkgs/default.nix` and to provide the `packaging` pip package.
@avdv
Copy link
Member Author

avdv commented Nov 15, 2024

Note, running the "Update GHC" workflow (triggered manually) now is successful again: https://github.com/tweag/rules_haskell/actions/runs/11852416689

It found an update and created a PR here: #2259

@avdv avdv requested a review from ylecornec November 15, 2024 07:59
@avdv avdv added the merge-queue merge on green CI label Nov 15, 2024
@mergify mergify bot merged commit 20b8a65 into master Nov 18, 2024
122 checks passed
@mergify mergify bot deleted the cb/fix-ghc-update branch November 18, 2024 21:15
@mergify mergify bot removed the merge-queue merge on green CI label Nov 18, 2024
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.

2 participants