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

c-for-go: use digitalocean-labs fork #208

Conversation

mpontillo
Copy link
Contributor

Te current c-for-go project needs enhancement in order to accomodate generating bindings from the latest libvirt source.

This situation can be addressed by using a private fork (at least, until any required changes can be merged upstream). This commit streamlines the build process for c-for-go to allow building a private version to the bin/ directory. This allows go-libvirt to operate without contaminating the GOPATH with a different version.

This commit adds a 'replace' directive to go.mod in order to allow for the eventual usage of a custom version, but does not yet move utilize a different version (because the commit referenced in go.mod is unchanged).

Because the 'go install' tool recently changed behavior to NOT update the go.mod file, this commit also adds a reference to c-for-go in libvirt.go in order for it to persist, so that the 'replace' directive remains effective.

@mpontillo mpontillo requested a review from a team as a code owner February 9, 2024 04:34
Te current c-for-go project needs enhancement in order to accomodate
generating bindings from the latest libvirt source.

This situation can be addressed by using a private fork (at least, until
any required changes can be merged upstream). This commit streamlines
the build process for c-for-go to allow building a private version to
the bin/ directory. This allows go-libvirt to operate without
contaminating the GOPATH with a different version.

This commit adds a 'replace' directive to go.mod in order to allow for
the eventual usage of a custom version, but does not yet move utilize a
different version (because the commit referenced in go.mod is
unchanged).

Because the 'go install' tool recently changed behavior to NOT update
the go.mod file, this commit also adds a reference to c-for-go in
a file using an unused build tag in order for it to persist, so that
the 'replace' directive remains effective.
@mpontillo mpontillo force-pushed the mpontillo/build-private-c-for-go branch from c27484e to bfbdb49 Compare February 9, 2024 22:27
Copy link
Member

@trapgate trapgate left a comment

Choose a reason for hiding this comment

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

This isn't going to work as-is.


- name: Install golint
run: go get -u golang.org/x/lint/golint
run: go install golang.org/x/lint/golint@latest
Copy link
Member

Choose a reason for hiding this comment

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

You could use golangci for this - it'd be a superset of golint, and there's a public action for it.

https://github.com/golangci/golangci-lint

go.mod Outdated Show resolved Hide resolved
@trapgate
Copy link
Member

I should also mention that the c-for-go project has accepted patches from us in the past, though I haven't looked at the changes this time round so I don't know if this is something they're likely to object to.

@mpontillo
Copy link
Contributor Author

Now that our c-for-go changes are upstream, I'm closing this PR in favor of a new PR to make the compatability changes, and regenerate the bindings against the v8.0.0 tag in the libvirt tree.

@mpontillo mpontillo closed this Feb 27, 2024
@mpontillo
Copy link
Contributor Author

Superseded by #212.

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