-
Notifications
You must be signed in to change notification settings - Fork 40
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
cmake: use the cmake snap by default #938
base: main
Are you sure you want to change the base?
Conversation
- allow using the cmake snap or deb - add an option to specify the source for cmake
Hi, thanks for bringing this up. Here are some thoughts:
|
I agree with @tigarmo, but one thing we can do is install cmake from build-packages if it fails validation. I would probably only consider this for core26 onwards though |
Could we take inspiration from some of the other plugins and not include the cmake build-package if |
I like this approach! |
I don't personally like this approach much because if feels like a hacky way to do what @soumyaDghosh really wants to do, which is to use the snap instead of the deb. So they'd add a |
I don't think overriding parts:
cmake-deps:
plugin: nil
build-snaps:
- cmake
override-pull: |
apt-get --yes remove cmake
neochat:
plugin: cmake
after:
- cmake-deps
... In the long term, we do need to address this general inconsistency in our plugins. The logic in several of the plugins is that the
which isn't really particularly different from what I did above, but without having to manually work around an issue with the plugin. Currently we have a pretty bad situation regarding dependencies for plugins. Some, like autotools and cmake, simply require a set of packages with no way to override that. Some, like dotnet, require a user to provide the relevant command, which often means users use build-packages, but also has them using build-snaps or doing the install in other ways. A third group, like scons, expects the command(s) to be installed on the system before the first run of the environment validator or for the part to run after a That's pretty messy for someone whose primary use case is packaging things with craft tools. In the simplest cases, it turns into three groups:
However, if we need a custom version of the build tool, we have different groups:
I think eliminating this last group is a good thing. The root environment validator already ignores a missing or failed command if there's a |
The snap is set by default because
PATH
is overriden, which is problematic. see here