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

Support plugin builds #856

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Support plugin builds #856

wants to merge 1 commit into from

Conversation

hsanjuan
Copy link
Contributor

Placing a "plugin" file in the dists/<repo> folder will trigger a -buildmode=plugin build using CGO.

Placing a "plugin" file in the `dists/<repo>` folder will trigger a
-buildmode=plugin build using CGO.
@hsanjuan hsanjuan self-assigned this Jun 13, 2023
@aschmahmann aschmahmann removed the request for review from guseggert June 13, 2023 22:05
Copy link
Contributor

@aschmahmann aschmahmann left a comment

Choose a reason for hiding this comment

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

I assume you've been testing with #857, has that been working alright?

Don't see anything outstanding outside of the two comments below so LGTM, although I haven't done any local testing so if anyone else wants to give some 👀 (especially ones that barely know bash 😅) that could be useful.

@@ -211,6 +225,7 @@ function printInitialDistfile() {
"owner": "$(< repo-owner)",
"description": "$(< description)",
"date": "$(date -u '+%B %d, %Y')",
"plugin": "$plugin",
Copy link
Contributor

Choose a reason for hiding this comment

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

where is this set? (sorry if this is just obvious, my shell is pretty meh)

Comment on lines +258 to +261
local plugin="false"
if [ -e plugin ]; then
plugin="true"
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you manually adding a plugin file to indicate something is a plugin? If so could you document it, and if not too painful add it to dist.sh new-go-dist? If it's a pain then just documenting should be fine.

@hsanjuan
Copy link
Contributor Author

I assume you've been testing with #857, has that been working alright?

Don't see anything outstanding outside of the two comments below so LGTM, although I haven't done any local testing so if anyone else wants to give some eyes (especially ones that barely know bash sweat_smile) that could be useful.

It "works"... but I don't find it very clean, the approach is a bit arbitrary.

Moreover the CI is not prepared to build on anything non linux/amd64, because gcc cross-compiling tools are not installed, and I look to at least have darwin and apparently it is not as easy as installing a gcc package.

So I'm not sure it is worth merging. I thought building the plugin in the exact conditions that Kubo is built would ensure compatibility, but also apparently the plugin just works fine now by building directly by hand (I have no idea if it has to do with Boxo, with re-organizing code, with tagged releases of things or what exactly...).

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.

2 participants