-
Notifications
You must be signed in to change notification settings - Fork 8
Fix CI pipeline issues in pull request #261
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
base: master
Are you sure you want to change the base?
Conversation
- Add weeder job to PR workflow that checks for unused code - Generate HIE files during build for weeder analysis - Upload HIE files and .conf files as artifacts for weeder job - Fix weeder.toml config: use module names instead of file paths - Keep action versions consistent with master (v6/v5)
Code ReviewSummaryThis PR adds weeder integration to detect unused code in the CI pipeline. Overall good addition for code quality, but there are several areas for improvement. Issues & Concerns1. CI Inefficiency - Redundant HIE File Generation.github/workflows/pullrequest.yml:72 The build step now generates HIE files with custom GHC options, but this conflicts with the configure step:
Problem: These options don't compose well. The second invocation may trigger partial rebuilds. Fix: Move HIE generation flags to the configure step: - name: Configure project
run: cabal configure --enable-tests --enable-benchmarks --ghc-options="-O0 -j8 -fwrite-ide-info -hiedir=.hiefiles"
- name: Build project
run: cabal build all -j4This ensures consistent build artifacts and avoids potential rebuild overhead. 2. Artifact Upload Pattern Too Broad.github/workflows/pullrequest.yml:80 The 3. Missing Error Handling.github/workflows/pullrequest.yml:233-239 The weeder job checks for .hiefiles directory but doesn't verify its contents. Add validation to check that HIE files were actually generated. 4. weeder.toml Configurationconfig/weeder.toml:3 Good fix changing Performance Considerations
SecurityNo security concerns. Recommendations
Questions
Overall: Good addition. Main concern is GHC options handling which could cause inefficient rebuilds. |
Add path: . to download-artifact to extract files directly to the working directory instead of a subdirectory named after the artifact.
PR Review: CI Pipeline - Weeder IntegrationOverviewThis PR adds weeder (unused code detection) to the CI pipeline. The implementation is solid but has several opportunities for improvement. Critical Issue: Build Configuration ConflictLocation: .github/workflows/pullrequest.yml:71-72 GHC options are specified twice:
The second invocation overrides the first, removing -O0 -j8 optimizations. Fix: Merge options in build step: Code Succinctness Issues
Positives
SummaryMust Fix: Merge GHC options |
Move weeder installation to the build job and include the binary in artifacts. This eliminates the need for haskell-actions/setup in the weeder job, avoiding transient ghcup installation failures.
Code Review - PR #261SummaryGood addition of weeder to catch unused code early. The implementation has the right idea but can be optimized for efficiency and reliability. Issues & Improvements1. Artifact Upload Inefficiency (
|
Closes #
How to test
Checklist