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

cardano-node: reduce orphan instances #5466

Merged
merged 1 commit into from
Sep 18, 2023
Merged

cardano-node: reduce orphan instances #5466

merged 1 commit into from
Sep 18, 2023

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Sep 13, 2023

Contributes to fixing #5470

Description

This PR starts reducing the content of the Cardano.Node.Orphans module.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. These may include:
    • golden tests
    • property tests
    • roundtrip tests
    • integration tests
      See Runnings tests for more details
  • Any changes are noted in the CHANGELOG.md for affected package
  • The version bounds in .cabal files are updated
  • CI passes. See note on CI. The following CI checks are required:
    • Code is linted with hlint. See .github/workflows/check-hlint.yml to get the hlint version
    • Code is formatted with stylish-haskell. See .github/workflows/stylish-haskell.yml to get the stylish-haskell version
    • Code builds on Linux, MacOS and Windows for ghc-8.10.7 and ghc-9.2.7
  • Self-reviewed the diff

@smelc smelc changed the title cardano-node: remove unused orphan instance cardano-node: reduce orphan instances Sep 13, 2023
Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

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

LGTM, have you opened PRs in the other relevant repos?

cardano-node/src/Cardano/Node/Tracing/Tracers/Peer.hs Outdated Show resolved Hide resolved
@smelc
Copy link
Contributor Author

smelc commented Sep 13, 2023

LGTM, have you opened PRs in the other relevant repos?

@Jimbo4350> That's my question for the remaining instances. For those I can't inline the typeclass definition in the positions where it is used. So should I add the instances to the other relevant repos? And then we will use those new instances when we update our dependencies (that's our workflow right?).

@Jimbo4350
Copy link
Contributor

LGTM, have you opened PRs in the other relevant repos?

@Jimbo4350> That's my question for the remaining instances. For those I can't inline the typeclass definition in the positions where it is used. So should I add the instances to the other relevant repos? And then we will use those new instances when we update our dependencies (that's our workflow right?).

Yep add the instances to the relevant repos so in the next release we can remove these orphans.

@smelc
Copy link
Contributor Author

smelc commented Sep 13, 2023

@Jimbo4350> I started doing the PRs to other repos, e.g. input-output-hk/iohk-monitoring-framework#644

However, I suggest to merge this one soon, as this one - in the current state - is standalone. What do you think?

@smelc smelc marked this pull request as ready for review September 13, 2023 15:14
@smelc smelc requested a review from a team as a code owner September 13, 2023 15:14
@smelc smelc force-pushed the smelc@shrink-orphans branch from 74f0682 to 5cfe593 Compare September 13, 2023 15:34
@smelc
Copy link
Contributor Author

smelc commented Sep 14, 2023

Created the other PR required to get rid of Orphans.hs: IntersectMBO/ouroboros-network#4674

@smelc smelc mentioned this pull request Sep 18, 2023
5 tasks
@smelc smelc force-pushed the smelc@shrink-orphans branch from 5cfe593 to 516709a Compare September 18, 2023 07:28
@smelc
Copy link
Contributor Author

smelc commented Sep 18, 2023

I'm enqueueing for merge, since in the final state it only removes an unusued orphan instance and is good to go as is.

I've kept track in #5470 of the follow-up work in other repos to further shrink the instances from this repo.

@smelc smelc enabled auto-merge September 18, 2023 07:37
@carbolymer
Copy link
Contributor

carbolymer commented Sep 18, 2023

@smelc I have no clue what happened to ubuntu runners that they're failing now, but maybe you need to add apt update in GHA workflow to fix them: https://github.com/input-output-hk/cardano-api/pull/248/files#diff-c09cc8dc973415b1221308559b96942a1c4b872e690bf360fc22d9b42822d519R48

@smelc smelc requested review from a team as code owners September 18, 2023 12:06
@smelc smelc force-pushed the smelc@shrink-orphans branch from a92b0fd to 516709a Compare September 18, 2023 13:04
@smelc smelc added this pull request to the merge queue Sep 18, 2023
Merged via the queue into master with commit bea5d36 Sep 18, 2023
@smelc smelc deleted the smelc@shrink-orphans branch September 18, 2023 14:16
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