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

Add a systemd cabal flag #326

Closed
wants to merge 1 commit into from
Closed

Add a systemd cabal flag #326

wants to merge 1 commit into from

Conversation

erikd
Copy link
Contributor

@erikd erikd commented Oct 3, 2023

This is needed because neither MacOS nor Windows have systemd but it is desirable on Linux.

Changelog

- description: |
   Add a systemd cabal flag
# uncomment types applicable to the change:
  type: feature        # introduces a new feature

Context

Manual testing:

> cabal build all --dry-run --flag=-systemd 
Up to date
> jq < dist-newstyle/cache/plan.json | grep systemd
        "systemd": false,
        ....

> cabal build all --dry-run --flag=+systemd 
Resolving dependencies...
....

> jq < dist-newstyle/cache/plan.json | grep systemd
        "systemd": true,
         ....
> cabal build all --dry-run 
Resolving dependencies...
...
> jq < dist-newstyle/cache/plan.json | grep systemd
        "systemd": true,
         ...

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • The change log section in the PR description has been filled in
  • New tests are added if needed and existing tests are updated. These may include:
    • golden tests
    • property tests
    • round trip tests
    • integration tests
      See Running tests for more details
  • 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
  • The changelog section in the PR is updated to describe the change
  • Self-reviewed the diff

This is needed because neither MacOS nor Windows have systemd but
it is desirable on Linux.
@@ -33,8 +38,6 @@ common project-config
-Wpartial-fields
-Wredundant-constraints

if impl(ghc >= 9.6)
ghc-options: -Wunused-packages
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need to remove this to avoid warnings.

Was not able to conditionally disable the warning.

@newhoggy
Copy link
Contributor

newhoggy commented Oct 3, 2023

Do you get systemd support just by adding the package? Or is there some Haskell code incoming. Also, why does the CLI need systemd support?

@angerman
Copy link
Collaborator

angerman commented Oct 3, 2023

I think we might have had some miscommunication here. Building cabal build -j cardano-cli in the cardano-node repo. will complain about the libsystemd-journal dependency; that is however more an issue of building Cardano-cli from the node repo than a Cardano-cli issue. I'm sorry I sent @erikd down this hole.

@angerman angerman closed this Oct 3, 2023
@erikd erikd deleted the erikd/systemd branch January 31, 2024 03:29
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