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

Port to pure golang implementation and remove "C" #16

Closed
purpleidea opened this issue Aug 28, 2023 · 4 comments
Closed

Port to pure golang implementation and remove "C" #16

purpleidea opened this issue Aug 28, 2023 · 4 comments

Comments

@purpleidea
Copy link

A pure-golang implementation of this would be better, more portable, and also allow for building with: CGO_ENABLED=0.
This would allow for easier reproducible builds for example, as explained here: https://go.dev/blog/rebuild

Would someone like to port this to remove the "C" implementation?

I'm considering (but have not yet decided) to drop "C" stuff in mgmt. https://github.com/purpleidea/mgmt/ if I decide to do so, and this isn't ported, then I would have to either drop the augeas resource entirely or at least from the default builds.

Thank you!

@dominikh
Copy link
Owner

This package is specifically a set of bindings to the Augeas library. A pure Go reimplementation of Augeas would be its own, separate project, which would require orders of magnitude more code and work. It also wouldn't be Augeas anymore, but a new project with similar goals to Augeas. That is out of scope for this project and for me.

You could also look into modernc.org/ccgo/v3 for a mechanical translation from C to Go.

@dominikh dominikh closed this as not planned Won't fix, can't repro, duplicate, stale Aug 28, 2023
@purpleidea
Copy link
Author

This package is specifically a set of bindings to the Augeas library. A pure Go reimplementation of Augeas would be its own, separate project, which would require orders of magnitude more code and work. It also wouldn't be Augeas anymore, but a new project with similar goals to Augeas. That is out of scope for this project and for me.

Yeah, i totally agree on all these points, sorry for the noise. I had figured there was no better place to track the idea than here. Since this project is kind of dormant anyways do you want to leave it open in case someone sees this and gets the idea to make a new project? I previously did a search for golang+augeas and found nothing but this.

You could also look into modernc.org/ccgo/v3 for a mechanical translation from C to Go.

Neat, I didn't know about this, thanks!

@dominikh
Copy link
Owner

I don't think this would be the right place to "track the idea". Better options might be the Go mailing list or possibly the Augeas mailing list.

in case someone sees this and gets the idea to make a new project

That seems highly unlikely. This repository averages zero views per month. I reckon your own issue has more chance of being seen, and of finding interested contributors.

@purpleidea
Copy link
Author

Fair enough, I agree with your points! Anyways I'm glad I found this project when I did, and I hope you had fun writing it. As far as I can remember I only ever needed augeas once in my puppet scripts writing career, but I thought it was neat for those edge cases!

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

No branches or pull requests

2 participants