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

Deprecation warning for setup action #301

Merged
merged 4 commits into from
Sep 30, 2023
Merged

Deprecation warning for setup action #301

merged 4 commits into from
Sep 30, 2023

Conversation

andreasabel
Copy link
Member

@andreasabel andreasabel commented Sep 9, 2023

@mihaimaruseac

Update: TODO:

  • Proper deprecation warning that makes it into the list of errors/warnings of a action run.

Copy link
Contributor

@mihaimaruseac mihaimaruseac left a comment

Choose a reason for hiding this comment

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

This LGTMs.

For the hlint actions, I noticed there is already https://github.com/haskell-actions/hlint-scan so I was wondering if we still need to move these two or we can just use the new one?

@andreasabel
Copy link
Member Author

@mihaimaruseac My last info was that you wanted to take over maintainership of the hlint-setup and hlint-run actions. If you want to step back from this, it is fine with me, we then just advertise them as "maintainer wanted".

I don't known whether hlint-scan is feature complete for the other two actions. If you advice users to migrate to hlint-scan, it would be good to put a migration guide here (and possible also at hlint-scan).

I'd like to go public soon with the migration haskell/actions/setup -> haskell-actions/setup, e.g. on discourse.haskell, so I would like to know your position, in particular whether we should say that the hlint actions are up for grabs.

Copy link
Member Author

@andreasabel andreasabel left a comment

Choose a reason for hiding this comment

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

TODO: proper warning. Done.

setup/src/setup-haskell.ts Show resolved Hide resolved
@mihaimaruseac
Copy link
Contributor

In this case, I'll transfer them to the org and then do a study of the existing one and these ones to compare which is more feature complete.

I should send a PR soon for that. Thank you for clarifying.

@mihaimaruseac
Copy link
Contributor

The repos are now split: hlint-setup and hlint-run. Here's a reference to what I did (so I can remember for later)

To do this, I first cloned this repo, then created 2 copies, hlint-setup and hlint-run (which will become the new repos):

...$ cp -r actions hlint-setup
...$ cp -r actions hlint-run

Then, for each of the repos I used the git-filter-repo tool to split the corresponding directory, as well as .github, .gitattributes and .gitignore:

...$ for d in hlint-*; do pushd $d; git filter-repo --path $d --path .github/ --path .gitattributes --path .gitignore --force; popd; done
/tmp/hs_actions/hlint-run
/tmp/hs_actions/hlint-run /tmp/hs_actions
Parsed 602 commits
New history written in 0.29 seconds; now repacking/cleaning...
Repacking your repo and cleaning out old unneeded objects
HEAD is now at 5dfdcc3 Add suport for GHC nightlies via GHCup (#279)
Enumerating objects: 665, done.
Counting objects: 100% (665/665), done.
Delta compression using up to 8 threads
Compressing objects: 100% (338/338), done.
Writing objects: 100% (665/665), done.
Total 665 (delta 262), reused 630 (delta 242), pack-reused 0
Completely finished after 0.60 seconds.
/tmp/hs_actions
/tmp/hs_actions/hlint-setup
/tmp/hs_actions/hlint-setup /tmp/hs_actions
Parsed 602 commits
New history written in 0.29 seconds; now repacking/cleaning...
Repacking your repo and cleaning out old unneeded objects
HEAD is now at 7c6e455 Add suport for GHC nightlies via GHCup (#279)
Enumerating objects: 622, done.
Counting objects: 100% (622/622), done.
Delta compression using up to 8 threads
Compressing objects: 100% (298/298), done.
Writing objects: 100% (622/622), done.
Total 622 (delta 254), reused 607 (delta 242), pack-reused 0
Completely finished after 0.58 seconds.
/tmp/hs_actions

I didn't use git subtree split as suggested on Stack Overflow because that command would not copy the tags over to the new repo. It has a benefit that it creates the place for the new repo in a new dir so I wouldn't need to manually create the initial copies, but the missing of tags is a bigger issue than just running 2 cp commands.

Next step is to move files from hlint-setup (hlint-run) to the root directory of the corresponding repo, making sure to also move the .gitignore and similar files. For hlint-run this also involves merging the local .github/ with the root one. This is done in cd55b0 and bd93c1.

Now I only need to make sure actions work in both repos, readme's are updated, etc. This should be doable quickly.

@liskin
Copy link

liskin commented Sep 17, 2023

@mihaimaruseac Can you please update the latest, v2 and v2.4 tags in https://github.com/haskell-actions/hlint-setup to point to the same commit as v2.4.8. Users of the actions are quite likely to use the v2 tag as that's what the README says, but that wouldn't work with the new repo because the v2 tag still points to a commit before the action was moved out of its subdirectory.

(Likewise for hlint-run)

@mihaimaruseac
Copy link
Contributor

@mihaimaruseac Can you please update the latest, v2 and v2.4 tags in https://github.com/haskell-actions/hlint-setup to point to the same commit as v2.4.8. Users of the actions are quite likely to use the v2 tag as that's what the README says, but that wouldn't work with the new repo because the v2 tag still points to a commit before the action was moved out of its subdirectory.

(Likewise for hlint-run)

Thanks. That's what I was missing (though it's really bad from supply chain security point of view, but that's for another discussion)

liskin added a commit to xmonad/xmonad that referenced this pull request Sep 18, 2023
liskin added a commit to xmonad/xmonad-contrib that referenced this pull request Sep 18, 2023
@liskin
Copy link

liskin commented Sep 18, 2023

Thanks. That's what I was missing

Works now. 👍
I think all that's left is to s|haskell/actions|haskell-actions| in the README.

(though it's really bad from supply chain security point of view, but that's for another discussion)

(yeah, but there isn't currently a good alternative; you can't specify a major version and pin the specific sha1 at the same time, and even if you could, the noise would be annoying; it'd be great if you could at least say "v2 but fail if it isn't gpg signed" … anyway, yeah, off-topic, sorry)

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.

None yet

3 participants