-
Notifications
You must be signed in to change notification settings - Fork 1
Fix CI build failure by adding libdisplay-info dependency #8
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
Fix CI build failure by adding libdisplay-info dependency #8
Conversation
|
🧙 Sourcery has finished reviewing your pull request! Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary:
This WIP PR aims to fix CI failures related to missing libdisplay-info-sys v0.2.2 crate dependency by installing libdisplay-info-dev. However, no implementation has been committed yet, and the proposed solution has critical platform compatibility issues.
Review Summary:
This PR has a fundamental platform mismatch issue - it proposes using Ubuntu/Debian package installation (apt-get install libdisplay-info-dev) while the CI actually runs on Arch Linux using pacman. The correct approach would be adding libdisplay-info to the existing pacman dependency list in the CI workflow. Additionally, the actual need for this dependency should be verified by examining recent CI failures. I used my knowledge of the COSMIC desktop repository structure and CI setup to identify these issues. Please feel free to provide feedback on this review for future improvements.
Follow-up suggestions:
@devloai implement the correct Arch Linux dependency fix in the CI workflow
@devloai verify which component actually requires libdisplay-info by checking CI logs
Co-authored-by: 0xrinegade <[email protected]>
|
@l r |
|
Alright, first things first— you added Roast Time:
Current repo pipeline workflow (very simplified)flowchart TD
A["Host runner: ubuntu-latest"] --> B["Container: archlinux:latest"]
B --> C["Run pacman update + install packages"]
C --> D["Clean android libs: rm -rf /host/usr/local/lib/android"]
D --> E["actions/checkout@v3 with recursive submodules"]
E --> F["Git config safe.directory '*'"]
F --> G["Run build script: just sysext"]
PR Change visualizationflowchart TD
subgraph "PR Added Dependency"
C -->|Added package| C_libdisplay["libdisplay-info"]
end
Tech Debt & Improvement Roadmapflowchart TD
A["Monolithic CI job"] --> B["Slow builds / flakiness due to up-to-date Arch updates"]
B --> C["Undocumented + unpinned dependencies"]
C --> D["Non reproducible builds -> hard to debug"]
D --> E["Fragile CI, inconsistent dev envs"]
subgraph Improvements
I1["Split tests into multiple jobs based on concerns (build, test, lint)"]
I2["Use pinned package versions or container snapshots"]
I3["Add verification steps for dependencies installed"]
I4["Document dependencies, reasons, and keep changelog"]
I5["Cache pacman package downloads + rely on minimal base images"]
I6["Add Ubuntu-based test matrix alongside Arch"]
end
E --> Improvements
Improvements -.-> A
Summary: Your PR content is super tiny, just an addition of a package install in the CI Arch container environment. It’s not wrong per se, but it’s a sign of a very fragile and bleeding-edge monolithic pipeline that will cause headaches down the road. Add better documentation, pin your dependencies, and start modularizing the CI jobs so each part can fail fast and independently. Stop relying on bleeding-edge Arch as your one and only CI environment. Also, clean up those cryptic commands like removing android libs without context. Fix that, and maybe some of the build gods will smile upon you. Otherwise, keep adding random packages and watch your CI falter hilariously on random days. |
Problem
The CI build was failing when compiling the
libdisplay-info-sys v0.2.2crate because the required system librarylibdisplay-infowas missing from the build environment. The build script would error out with:Root Cause
The
cosmic-compcomponent has a direct dependency onlibdisplay-info = "0.2.0"in itsCargo.toml, which requires the system library and pkg-config file to be present for the Rust build script to succeed.Solution
Added
libdisplay-infoto the Arch Linux package installation list in.github/workflows/ci.yml. The package is positioned alphabetically betweenjustandlibinputto maintain consistency with the existing ordering.This ensures that when the Rust crate
libdisplay-info-sys v0.2.2runs its build script, it can successfully find thelibdisplay-info.pcfile via pkg-config, preventing the build failure.Changes
libdisplay-infopackage to thepacmaninstallation command in the CI workflowTesting
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.