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

feat: Add base option for snapcraft #7320

Merged
merged 2 commits into from
Dec 19, 2022
Merged

feat: Add base option for snapcraft #7320

merged 2 commits into from
Dec 19, 2022

Conversation

filfreire
Copy link
Contributor

@filfreire filfreire commented Dec 17, 2022

Related to #7319 and #6976

This would unblock users facing issues related use to the older core18 base type.

Motivation for this PR came from Kong/insomnia#5531.

@mmaietta let me know if there's anything that I can do to help move either this PR or #6976 forward. I'm not sure if I'm also missing some changes e.g. (like the changeset mentioned bellow, or how to update the docs) Updated changeset, schema and docs.

@changeset-bot
Copy link

changeset-bot bot commented Dec 17, 2022

🦋 Changeset detected

Latest commit: 2db1366

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
app-builder-lib Major
dmg-builder Major
electron-builder-squirrel-windows Major
electron-builder Major
electron-forge-maker-appimage Major
electron-forge-maker-nsis-web Major
electron-forge-maker-nsis Major
electron-forge-maker-snap Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented Dec 17, 2022

Deploy Preview for car-park-attendant-cleat-11576 ready!

Name Link
🔨 Latest commit 2db1366
🔍 Latest deploy log https://app.netlify.com/sites/car-park-attendant-cleat-11576/deploys/639da77e8d73500008935795
😎 Deploy Preview https://deploy-preview-7320--car-park-attendant-cleat-11576.netlify.app/configuration/snap
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@filfreire filfreire changed the title Add base option for snapcraft feat: Add base option for snapcraft Dec 17, 2022
@mmaietta
Copy link
Collaborator

@filfreire this PR LGTM 👍 Thanks for the unit tests.

Not sure what steps remain on #6976 apart from fixing the tests. Is updating plug gnome-3-38-2004 a simple transition or would other things break? The PR needs to be rebased on latest master, but also the linux test suite failed for that PR

@filfreire
Copy link
Contributor Author

@mmaietta, according to the official docs, the gnome plug supposedly depends on the base the user picks, so for instance:

BUT, I couldn't find anything though in contrary to using an old gnome plug on a recent core base snap. Just using latest gnome on an older base seems to be discouraged.

Even taking this into account I reckon adding the base option should be non-blocking for this PR.

Users that want to set a custom base should also look into setting the plugs they want on their electron build config and not rely on the default ones from electron-builder template.

@mmaietta
Copy link
Collaborator

Sounds solid 👍

@mmaietta mmaietta merged commit 2852cb5 into electron-userland:master Dec 19, 2022
@filfreire filfreire deleted the feat/issue-7319-base-option-snapcraft branch January 10, 2023 12:16
@github-actions github-actions bot mentioned this pull request Mar 4, 2023
@vishnusaivivek
Copy link

Hello @mmaietta,

I'm currently using electron-builder@24.6.4. While attempting to build snaps, I encountered an issue. Despite selecting core20 as the base, upon unpacking the snap and examining the snap.yml file, I noticed that the base remains as core18, the default base. Upon further investigation, I found that the changes from this merged commit seem to be absent in the latest version of electron-builder. I'm curious to know whether this omission was intentional or if it was overlooked by mistake.

Your insights on this matter would be greatly appreciated.

Best regards,
vishnusaivivek siriguppa

@mmaietta
Copy link
Collaborator

mmaietta commented Oct 19, 2023

I'm curious to know whether this omission was intentional or if it was overlooked by mistake

Neither. It's still in the codebase:

if (options.base != null) {
snap.base = options.base
// from core22 onwards adapter is legacy
if (Number(snap.base.split("core")[1]) >= 22) {
delete appDescriptor.adapter
}
}

@vishnusaivivek
Copy link

@mmaietta Thank you for your swift response. I've come to realize that the problem was due to my own alterations, and it was resolved by modifying the configuration in the package.json file. Thank you once again for your assistance.

Best regards,
vishnusaivivek siriguppa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants