-
Notifications
You must be signed in to change notification settings - Fork 5
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
GoSlice as lib to avoid extra binary #4
Comments
Hi @aligator, There are a few concerns that I considered when I include GoSlice in SlicerA. Firstly, as GoSlice is still in its very early experimental phrase as stated in its README
As any internal functions / API might change at anytime (according to my definition of "very experimental" software), and I am usually busy during the day, it will be hard for me to keep track of your updates in the GoSlice development. Including a binary instead of using it as a go module will be beneficial to anyone who want to build the system and not to deal with compatibility issues in the future even if you have updated the GoSlice API. Secondly, SlicerA is deigned to be used by myself, and I am not updating the slicer that often if it works perfectly on my machines. So including a binary instead of pulling from 3rd party dependencies every time I want to deploy a new 3D printer make the deployment process more stable / robust in the long run. I will consider integrating GoSlice directly as a go module into the SlicerA if and only if GoSlice has created its first stable release (in term of internal API / functions and runtime stability). Feel free to let me know how you think about this arrangement 👍🏻 |
Hi,
The experimental is mostly because I am not an expert at creating a slicer and basically everything is done by trial and error. (still, it works quite well for this :-) Still internal functions may change in one or the other way, also the more internal API (such as if you want to replace one specific part of GoSlice or add additional custom modifiers or renderers) may not be that stable. But as you just call the slicer as it is, you touch only the passed options (either through cli or the options struct) and both are basically kept in sync. If a new option is added it's also added to the CLI, if it changes somehow the behavior of one option, it will also change if you pass the option through the CLI. As I use version-tags (like it's anyway needed for Go modules) you can safely just pin to one specific GoSlice version in the go.mod file. That way you do not have to worry about a changing api even if I published a new version because SlicerA still can use the older version. So it shouldn't be a problem for your second point. Because every time you build you will get exactly the version you pinned in the go.mod file. Basically the only API you need (if you do not want to replace internal modules) is this: options := DefaultOptions()
p := goslice.NewGoSlice(options)
err := p.Process()
if err != nil {
fmt.Println("error while processing file:", err)
os.Exit(2)
} This won't change in any breaking way. Where options is the option struct, where you can set the slicing options and input / output file. Basically everything in that struct is just exposed to the cli directly. So it doesn't really matter if you pass values by cli or by the options struct. As I know that at least you use GoSlice, I can promise you: If I change anything in that options doing a breaking change, I will just deprecate old values and only remove them in a next major version. The only thing I cannot promise is that nothing changes internally but also then it doesn't matter if you call it as lib or as cli. After all I think it's a much cleaner, more stable and simpler way to call it as lib and you can still use the specific version you want. That's my thought about it :-) |
Hi,
is there a specific reason you did not use GoSlice as lib? As you licensed SlicerA also AGPL it shouldn't be a problem, as long as you don't ship it directly with aroz and just provide it as extra, downloadable module.
This would make the handling of SlicerA more easy. It would also fix the permission problem I faced.
If it's ok from your side, I would create a PR for it.
The text was updated successfully, but these errors were encountered: