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

Cleanup: remove deprecated options and targets #2050

Merged
merged 12 commits into from
Nov 27, 2023
Merged

Conversation

avdv
Copy link
Member

@avdv avdv commented Nov 20, 2023

  1. remove compiler_flags option (users will get an error message now telling them to use ghcopts instead, to ease the migration -- this error handling should be removed after the next version was released)
  2. remove REPL alias introduced in Change REPL convention and add documentation about REPL's in guide #460
  3. remove deprecated nixpkgs platform aliases
  4. move nixpkgs bzl_library to //docs (in order to get rid of any references to rules_nixpkgs_* in the core rules_haskell module)
  5. enable lint rules and remove unused variables and load statements
  6. remove unneeded indirect repositories from rules_haskell_tests module (as reported by gazelle's go_deps extension)

@avdv avdv force-pushed the cleanup-deprecated branch 12 times, most recently from 3cbfaf3 to 22bfb82 Compare November 21, 2023 17:11
@avdv avdv marked this pull request as ready for review November 21, 2023 17:11
@avdv avdv requested a review from aherrmann November 21, 2023 17:11
avdv added 10 commits November 23, 2023 11:36
This option was deprecated since rules_haskell 0.14, so it is time to get rid of it.
These were introduced in rules_haskell 0.7 and have been deprecated since.
The core rules_haskell module only depends on rules_nixpkgs_* as dev dependencies, so
do not reference these from the haskell package.
There is no need to build and run buildifier for each module and for every
GHC version in order to keep the code base in shape.

Tag the buildifier tests with `manual` and only run the buildifier for the
top-level repository (which formats / lints all files of the git repo).
Use `//buildifier:buildifier_test` to check for proper formatting.
@avdv avdv force-pushed the cleanup-deprecated branch from 22bfb82 to 87f4fe9 Compare November 23, 2023 10:36
@avdv
Copy link
Member Author

avdv commented Nov 27, 2023

ping @aherrmann

Copy link
Member

@aherrmann aherrmann left a comment

Choose a reason for hiding this comment

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

Nice cleanup, thank you!

Comment on lines 99 to 132
bazel test //...
bazel build //...
Copy link
Member

Choose a reason for hiding this comment

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

I guess this is done because rules_haskell_nix does not contain any tests (apart from the manual buildifier test)?
We need not to forget to switch this back if we every add tests again.
I wonder if it may be safer to add a dummy test and keep this as bazel test //....

Copy link
Member Author

Choose a reason for hiding this comment

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

Good call. I added a small test and removed the test -> build commit.

```
WARNING: <root>/MODULE.bazel:216:24: The module extension go_deps defined in @gazelle//:extensions.bzl reported incorrect imports of repositories via use_repo():

Imported, but reported as indirect dependencies by the extension:
    com_github_golang_mock, com_github_golang_protobuf, org_golang_google_genproto, org_golang_google_grpc, org_golang_google_protobuf, org_golang_x_net, org_golang_x_tools

 ** You can use the following buildozer command(s) to fix these issues:

buildozer 'use_repo_remove @gazelle//:extensions.bzl go_deps
com_github_golang_mock com_github_golang_protobuf org_golang_google_genproto
org_golang_google_grpc org_golang_google_protobuf org_golang_x_net
org_golang_x_tools' //MODULE.bazel:all
```
@avdv avdv force-pushed the cleanup-deprecated branch 2 times, most recently from e0c2095 to 0cfb659 Compare November 27, 2023 15:10
@avdv avdv added the merge-queue merge on green CI label Nov 27, 2023
@avdv avdv force-pushed the cleanup-deprecated branch from 0cfb659 to 49e009b Compare November 27, 2023 17:42
@avdv avdv force-pushed the cleanup-deprecated branch from 49e009b to 2a250dd Compare November 27, 2023 17:43
@mergify mergify bot merged commit 3912117 into master Nov 27, 2023
40 checks passed
@mergify mergify bot deleted the cleanup-deprecated branch November 27, 2023 21:05
@mergify mergify bot removed the merge-queue merge on green CI label Nov 27, 2023
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