Skip to content

Add Weeder #9121

Open
Open

Description

@ulysses4ever

Mikolaj says:

PR that removes dead code (after asking around if it's not used in a weird way in some test script) is ... [very] valuable (and there are tools for that, e.g, weeder).

So, I'm opening a ticket about Weeder (didn't find any old one). It looks like the repo still has remnants of a past Weeder setup even:

I think it could be added to CI, perhaps?

Activity

  1. added
    re: devx
    on Jul 13, 2023
  2. ffaf1 commented on Jul 13, 2023

    @ffaf1
    Collaborator

    If we run weeder now, does it find dead code?

    The only thing I am worried about is false positives.

  3. philderbeast commented on Jul 14, 2023

    @philderbeast
    Collaborator

    There's a weeder gh-action.

  4. philderbeast commented on Dec 27, 2023

    @philderbeast
    Collaborator

    Weeder has switched to using TOML for configuration. Also the .hie files in cabal-testsuite cannot yet be ignored by configuration and must be deleted (as a workaround) ocharles/weeder#56 (comment).

    $ weeder --version
    weeder version 2.7.0
    hie version 9063
    $ weeder --write-default-config
    Did not find config: wrote default config to ./weeder.toml
    incompatible hie file: /.../cabal-testsuite/PackageTests/CopyHie/setup.dist/work/dist/build/extra-compilation-artifacts/hie/HieLocal.hie
        this version of weeder was compiled with GHC version 9063
        the hie files in this project were generated with GHC version 9047
        weeder must be built with the same GHC version as the project it is used on
    
  5. philderbeast commented on Dec 27, 2023

    @philderbeast
    Collaborator
  6. Mikolaj commented on Dec 28, 2023

    @Mikolaj
    Member

    I wonder if we can make CI run weeder, to avoid it bit-rotting so quickly (3 years) again? But it's tricky, because false positive can annoy users and also a temporarily unused code while developing should not cancel CI runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    re: devxtype: enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions