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

zapcore/FieldType: Don't change enum values #955

Merged
merged 1 commit into from May 25, 2021
Merged

Conversation

abhinav
Copy link
Collaborator

@abhinav abhinav commented May 25, 2021

Although the values of the FieldType enums aren't part of the Zap
contract, changing existing values is still a risky change.

apidiff considers this a brekaing change.

Incompatible changes:
- BinaryType: value changed from 3 to 4
- BoolType: value changed from 4 to 5
- ByteStringType: value changed from 5 to 6
- Complex128Type: value changed from 6 to 7
- Complex64Type: value changed from 7 to 8
- DurationType: value changed from 8 to 9
- ErrorType: value changed from 26 to 27
- Float32Type: value changed from 10 to 11
- Float64Type: value changed from 9 to 10
- Int16Type: value changed from 13 to 14
- Int32Type: value changed from 12 to 13
- Int64Type: value changed from 11 to 12
- Int8Type: value changed from 14 to 15
- NamespaceType: value changed from 24 to 25
- ReflectType: value changed from 23 to 24
- SkipType: value changed from 27 to 28
- StringType: value changed from 15 to 16
- StringerType: value changed from 25 to 26
- TimeFullType: value changed from 17 to 18
- TimeType: value changed from 16 to 17
- Uint16Type: value changed from 20 to 21
- Uint32Type: value changed from 19 to 20
- Uint64Type: value changed from 18 to 19
- Uint8Type: value changed from 21 to 22
- UintptrType: value changed from 22 to 23

Again, although maintianing these values is not part of the Zap
contract, in the interest of erring on the side of safety, I'm moving
the new FieldType (added in #912) to the bottom to avoid changing the
values of the other items.

Although the values of the FieldType enums aren't part of the Zap
contract, changing existing values is still a risky change.

[apidiff] considers this a brekaing change.

```
Incompatible changes:
- BinaryType: value changed from 3 to 4
- BoolType: value changed from 4 to 5
- ByteStringType: value changed from 5 to 6
- Complex128Type: value changed from 6 to 7
- Complex64Type: value changed from 7 to 8
- DurationType: value changed from 8 to 9
- ErrorType: value changed from 26 to 27
- Float32Type: value changed from 10 to 11
- Float64Type: value changed from 9 to 10
- Int16Type: value changed from 13 to 14
- Int32Type: value changed from 12 to 13
- Int64Type: value changed from 11 to 12
- Int8Type: value changed from 14 to 15
- NamespaceType: value changed from 24 to 25
- ReflectType: value changed from 23 to 24
- SkipType: value changed from 27 to 28
- StringType: value changed from 15 to 16
- StringerType: value changed from 25 to 26
- TimeFullType: value changed from 17 to 18
- TimeType: value changed from 16 to 17
- Uint16Type: value changed from 20 to 21
- Uint32Type: value changed from 19 to 20
- Uint64Type: value changed from 18 to 19
- Uint8Type: value changed from 21 to 22
- UintptrType: value changed from 22 to 23
```

  [apidiff]: https://github.com/golang/exp/blob/master/apidiff/README.md

Again, although maintianing these values is not part of the Zap
contract, in the interest of erring on the side of safety, I'm moving
the new FieldType (added in #912) to the bottom to avoid changing the
values of the other items.
@codecov
Copy link

codecov bot commented May 25, 2021

Codecov Report

Merging #955 (c942611) into master (fec3dad) will increase coverage by 0.10%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #955      +/-   ##
==========================================
+ Coverage   98.02%   98.12%   +0.10%     
==========================================
  Files          44       44              
  Lines        1975     1975              
==========================================
+ Hits         1936     1938       +2     
+ Misses         30       29       -1     
+ Partials        9        8       -1     
Impacted Files Coverage Δ
zapcore/field.go 100.00% <ø> (ø)
zapcore/sampler.go 100.00% <0.00%> (+3.84%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fec3dad...c942611. Read the comment docs.

@abhinav abhinav merged commit 56304dc into master May 25, 2021
@abhinav abhinav deleted the abg/unchange-iota branch May 25, 2021 20:06
abhinav added a commit that referenced this pull request May 25, 2021
Although the values of the FieldType enums aren't part of the Zap
contract, changing existing values is still a risky change.

[apidiff] considers this a brekaing change.

```
Incompatible changes:
- BinaryType: value changed from 3 to 4
- BoolType: value changed from 4 to 5
- ByteStringType: value changed from 5 to 6
- Complex128Type: value changed from 6 to 7
- Complex64Type: value changed from 7 to 8
- DurationType: value changed from 8 to 9
- ErrorType: value changed from 26 to 27
- Float32Type: value changed from 10 to 11
- Float64Type: value changed from 9 to 10
- Int16Type: value changed from 13 to 14
- Int32Type: value changed from 12 to 13
- Int64Type: value changed from 11 to 12
- Int8Type: value changed from 14 to 15
- NamespaceType: value changed from 24 to 25
- ReflectType: value changed from 23 to 24
- SkipType: value changed from 27 to 28
- StringType: value changed from 15 to 16
- StringerType: value changed from 25 to 26
- TimeFullType: value changed from 17 to 18
- TimeType: value changed from 16 to 17
- Uint16Type: value changed from 20 to 21
- Uint32Type: value changed from 19 to 20
- Uint64Type: value changed from 18 to 19
- Uint8Type: value changed from 21 to 22
- UintptrType: value changed from 22 to 23
```

  [apidiff]: https://github.com/golang/exp/blob/master/apidiff/README.md

Again, although maintianing these values is not part of the Zap
contract, in the interest of erring on the side of safety, I'm moving
the new FieldType (added in #912) to the bottom to avoid changing the
values of the other items.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants