Skip to content

Replace Apache 2.0 licensed gopkg.in/yaml.v3 with MIT licensed github.com/goccy/go-yaml#388

Merged
lippserd merged 1 commit intomasterfrom
bugfix/gpl2
Nov 9, 2021
Merged

Replace Apache 2.0 licensed gopkg.in/yaml.v3 with MIT licensed github.com/goccy/go-yaml#388
lippserd merged 1 commit intomasterfrom
bugfix/gpl2

Conversation

@Al2Klimov
Copy link
Copy Markdown
Member

... not to have GPLv2<->Apache 2.0 (app<->deps) license conflicts.

fixes #381

@Al2Klimov Al2Klimov added this to the v1.0.0-rc2 milestone Oct 13, 2021
@Al2Klimov Al2Klimov requested a review from lippserd October 13, 2021 10:31
@cla-bot cla-bot bot added the cla/signed label Oct 13, 2021
@Al2Klimov Al2Klimov self-assigned this Oct 13, 2021
Copy link
Copy Markdown
Member

@lippserd lippserd left a comment

Choose a reason for hiding this comment

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

Tests are failing.

@Al2Klimov Al2Klimov force-pushed the bugfix/gpl2 branch 2 times, most recently from 633d05d to 78a260a Compare October 13, 2021 15:28
@lippserd
Copy link
Copy Markdown
Member

Tests still fail. I'm also not a fan of removing the defaults from the structs.

@Al2Klimov Al2Klimov marked this pull request as draft October 15, 2021 13:14
@Al2Klimov
Copy link
Copy Markdown
Member Author

@Al2Klimov Al2Klimov removed their assignment Oct 18, 2021
@Al2Klimov Al2Klimov marked this pull request as ready for review October 18, 2021 13:53
@Al2Klimov
Copy link
Copy Markdown
Member Author

Despite this is ready I'd wait until either:

@julianbrost
Copy link
Copy Markdown
Member

I wouldn't wait until last minute with merging as having this lying around (hopefully) finished (apart from the replace) when it could also be merged and receive implicit testing by all developers by just running icingadb.

@Al2Klimov
Copy link
Copy Markdown
Member Author

C'mon. There's only one question: Does our config work or not? I consider it already answered by our int. tests.

@lippserd
Copy link
Copy Markdown
Member

C'mon. There's only one question: Does our config work or not? I consider it already answered by our int. tests.

We already agreed to just use a patched version get this PR merged.

@julianbrost
Copy link
Copy Markdown
Member

Well, primarily I don't want to have this lying around in this "yeah well we're still waiting for something, so we don't have to do anything here" state but at least have it reviewed and in a "can be merged at any time" state. And if it's in this state, merging doesn't hurt, removing 2 lines from go.mod would be easy, should it still be merged in time.

I just want to avoid having this as the last thing and then notice that nobody had a closer look in the suggested patch or something like that. Also, the tests are in no way complete. I mean all configs used there are pretty much identical apart from IP addresses, ports and MySQL credentials.

@Al2Klimov Al2Klimov requested a review from julianbrost October 26, 2021 15:11
@lippserd lippserd self-requested a review November 3, 2021 11:17
@lippserd
Copy link
Copy Markdown
Member

lippserd commented Nov 3, 2021

Please rebase.

….com/goccy/go-yaml

... not to have GPLv2<->Apache 2.0 (app<->deps) license conflicts.
@julianbrost
Copy link
Copy Markdown
Member

@lippserd Does your review include the changes done in the github.com/goccy/go-yaml fork?

@lippserd
Copy link
Copy Markdown
Member

lippserd commented Nov 3, 2021

@lippserd Does your review include the changes done in the github.com/goccy/go-yaml fork?

Yes. The only thing I noticed is that the detection of the initial value is a little different than in the defaults pkg we are using:

reflect.Value.IsValid() vs reflect.DeepEqual(reflect.Zero(field.Type()).Interface(), field.Interface())

But I'm not quite sure what the difference is.

By the way, can't we just set the defaults after the YAML is decoded? 😆

@Al2Klimov
Copy link
Copy Markdown
Member Author

What for?

@lippserd
Copy link
Copy Markdown
Member

lippserd commented Nov 3, 2021

What for?

We would not have to patch the lib I guess.

@Al2Klimov
Copy link
Copy Markdown
Member Author

We've already patched our Redis lib, so I see no (greater) problem.

@lippserd
Copy link
Copy Markdown
Member

lippserd commented Nov 3, 2021

We've already patched our Redis lib, so I see no (greater) problem.

If I'm right, we would only have to move 3 lines of code. What is the problem with that?

@julianbrost
Copy link
Copy Markdown
Member

By the way, can't we just set the defaults after the YAML is decoded? laughing

Do we set defaults for anything where the zero value would be value but not what we want as default?

@lippserd
Copy link
Copy Markdown
Member

lippserd commented Nov 3, 2021

By the way, can't we just set the defaults after the YAML is decoded? laughing

Do we set defaults for anything where the zero value would be value but not what we want as default?

Both Alex PR and the defaults package rely on zero value detection for applying defaults.

@julianbrost
Copy link
Copy Markdown
Member

Yes, but there would be a slight change in behavior: right now, if foo has a default and you set foo: 0 in the config, it will continue using 0 as value whereas with your suggested change, it would use the default.

@lippserd
Copy link
Copy Markdown
Member

lippserd commented Nov 3, 2021

Yes, but there would be a slight change in behavior: right now, if foo has a default and you set foo: 0 in the config, it will continue using 0 as value whereas with your suggested change, it would use the default.

That is true!

@lippserd lippserd merged commit 94abcef into master Nov 9, 2021
@lippserd lippserd deleted the bugfix/gpl2 branch November 9, 2021 10:13
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.

Our license isn't compatible with our deps' ones

3 participants