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

hyprpm: install headers locally #4585

Merged
merged 2 commits into from
Feb 1, 2024
Merged

hyprpm: install headers locally #4585

merged 2 commits into from
Feb 1, 2024

Conversation

vaxerski
Copy link
Member

@vaxerski vaxerski commented Feb 1, 2024

cc @zakk4223 @DreamMaoMao @fufexan

hyprpm will now install headers locally to $XDG_DATA_HOME/hyprpm/headersRoot

Should completely eliminate duplicate headers / system headers issues.

hyprpm will now refuse to use system headers altogether:

eHeadersErrors CPluginManager::headersValid() {
const auto HLVER = getHyprlandVersion();
if (!std::filesystem::exists(DataState::getHeadersPath() + "/share/pkgconfig/hyprland.pc"))
return HEADERS_MISSING;

They are unreliable all things considered and to be frank who cares.

Bonus: no more asking for password to install headers.

Needs some testing, seems to pass my short tests.

@vaxerski vaxerski requested a review from fufexan February 1, 2024 16:10
@vaxerski
Copy link
Member Author

vaxerski commented Feb 1, 2024

I like how i just realized I hardcoded the path with my user name lol

@vaxerski vaxerski linked an issue Feb 1, 2024 that may be closed by this pull request
@vaxerski vaxerski mentioned this pull request Feb 1, 2024
@vaxerski vaxerski linked an issue Feb 1, 2024 that may be closed by this pull request
Copy link
Member

@fufexan fufexan left a comment

Choose a reason for hiding this comment

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

LGTM

hyprpm/src/core/PluginManager.cpp Show resolved Hide resolved
@fufexan
Copy link
Member

fufexan commented Feb 1, 2024

@jbeich would this change allow us to --skip-subprojects in hyprwm/hyprland-wiki#200?

@zakk4223
Copy link
Contributor

zakk4223 commented Feb 1, 2024

Ok, finally got to test this after wasting a bunch of time discovering makepkg clobbers branch names :/

All seems good to me. Normal and forced update both worked without header conflicts.

When plugins don't load due to mismatch sometimes the notification gets hidden by the big red config syntax error banner, but that's not an issue with this PR; I'll (eventually) create another issue for that one.

@vaxerski
Copy link
Member Author

vaxerski commented Feb 1, 2024

top. Merging then. Thanks bros

@vaxerski vaxerski merged commit 3656045 into main Feb 1, 2024
20 checks passed
fufexan pushed a commit to fufexan/Hyprland that referenced this pull request Feb 23, 2024
* hyprpm: install headers locally

* oopsie
https123456789 added a commit to https123456789/Hyprland that referenced this pull request Mar 10, 2024
https123456789 added a commit to https123456789/Hyprland that referenced this pull request Apr 10, 2024
vaxerski pushed a commit that referenced this pull request Apr 10, 2024
* hyprpm: only clone the required history

* hyprpm: don't include tracy when building headers in release mode

* chore: remove old, commented-out code

See #4585 (comment)

* chore: format code properly
lisuke pushed a commit to lisuke/Hyprland that referenced this pull request Apr 15, 2024
* hyprpm: install headers locally

* oopsie
lisuke pushed a commit to lisuke/Hyprland that referenced this pull request Apr 15, 2024
* hyprpm: only clone the required history

* hyprpm: don't include tracy when building headers in release mode

* chore: remove old, commented-out code

See hyprwm#4585 (comment)

* chore: format code properly
@vaxerski vaxerski deleted the hyprpm-local branch November 18, 2024 14:51
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.

Unable to use hyprpm hyprpm: Do something about system headers
3 participants