Skip to content
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.

diff key must be scalar #190

Merged
merged 3 commits into from
Oct 19, 2018
Merged

diff key must be scalar #190

merged 3 commits into from
Oct 19, 2018

Conversation

changpingc
Copy link
Contributor

See commits. I added some unit tests.

Key is used to match objects in diff & merge. We require keys
to be comparable in golang. If we serialize and then deserialize
a struct key without strong typing, it becomes map[string]interface{},
which is no longer comparable. Therefore, we want to enforce
a stronger requirement that keys are scalar, such as ints and strings.
Copy link
Contributor

@zdylag zdylag left a comment

Choose a reason for hiding this comment

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

Is there a reason to vendor oops in this PR?

@changpingc
Copy link
Contributor Author

vendor oops because #186 didn't

@stephen
Copy link
Contributor

stephen commented Oct 18, 2018 via email

@changpingc
Copy link
Contributor Author

@stephen not vendoring breaks go test

Copy link
Contributor

@zdylag zdylag left a comment

Choose a reason for hiding this comment

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

👍

@changpingc changpingc merged commit aa00d2c into master Oct 19, 2018
@changpingc changpingc deleted the changping/diff-key branch October 19, 2018 18:28
@coveralls
Copy link

Pull Request Test Coverage Report for Build 1166

  • 14 of 14 (100.0%) changed or added relevant lines in 1 file are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.2%) to 65.811%

Files with Coverage Reduction New Missed Lines %
sqlgen/reflect.go 1 80.36%
graphql/schemabuilder/reflect.go 2 72.8%
Totals Coverage Status
Change from base Build 1160: 0.2%
Covered Lines: 3540
Relevant Lines: 5379

💛 - Coveralls

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants