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

Generate stringer files automatically #841

Merged
merged 6 commits into from
Nov 8, 2021

Conversation

g4s8
Copy link
Contributor

@g4s8 g4s8 commented Oct 14, 2021

Added stringer annotations to git.go for ErrorClass and
ErrorCode. Added generate rule for Makefile to generate
string representations for these types (first building cgo files
in _obj dir to get C constants). Finally, updated ci actions
workflow to check that generated files are up to date.

Fixes: #543

Added `stringer` annotations to `git.go` for `ErrorClass` and
`ErrorCode`. Added `generate` rule for `Makefile` to generate
string representations for these types (first building cgo files
in `_obj` dir to get C constants). Finally, updated `ci` actions
workflow to check that generated files are up to date.

Ticket: libgit2#543
Copy link
Contributor

@lhchavez lhchavez left a comment

Choose a reason for hiding this comment

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

yay, thanks for the CI addition!

.github/workflows/ci.yml Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Apply review comments about stringer workflow steps

Co-authored-by: lhchavez <lhchavez@lhchavez.com>
@g4s8
Copy link
Contributor Author

g4s8 commented Nov 8, 2021

@lhchavez thanks for review! Please check new changes and answers.

Makefile Outdated Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
g4s8 and others added 2 commits November 8, 2021 17:08
Review fixes for workflow

Co-authored-by: lhchavez <lhchavez@lhchavez.com>
Co-authored-by: lhchavez <lhchavez@lhchavez.com>
@g4s8 g4s8 requested a review from lhchavez November 8, 2021 14:29
@g4s8
Copy link
Contributor Author

g4s8 commented Nov 8, 2021

Exported GOPATH in 9c737a6

Copy link
Contributor

@lhchavez lhchavez left a comment

Choose a reason for hiding this comment

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

yay! now it works in CI!

thank you for this improvement :D

@lhchavez lhchavez merged commit 5e35338 into libgit2:main Nov 8, 2021
@g4s8 g4s8 deleted the 543-stringer-generate branch November 8, 2021 14:39
lhchavez pushed a commit that referenced this pull request Nov 9, 2021
Added `stringer` annotations to `git.go` for `ErrorClass` and
`ErrorCode`. Added `generate` rule for `Makefile` to generate
string representations for these types (first building cgo files
in `_obj` dir to get C constants). Finally, updated `ci` actions
workflow to check that generated files are up to date.

Fixes: #543
(cherry picked from commit 5e35338)
lhchavez pushed a commit that referenced this pull request Nov 9, 2021
Added `stringer` annotations to `git.go` for `ErrorClass` and
`ErrorCode`. Added `generate` rule for `Makefile` to generate
string representations for these types (first building cgo files
in `_obj` dir to get C constants). Finally, updated `ci` actions
workflow to check that generated files are up to date.

Fixes: #543
(cherry picked from commit 5e35338)
lhchavez pushed a commit that referenced this pull request Nov 9, 2021
Added `stringer` annotations to `git.go` for `ErrorClass` and
`ErrorCode`. Added `generate` rule for `Makefile` to generate
string representations for these types (first building cgo files
in `_obj` dir to get C constants). Finally, updated `ci` actions
workflow to check that generated files are up to date.

Fixes: #543
(cherry picked from commit 5e35338)
lhchavez pushed a commit that referenced this pull request Nov 9, 2021
Added `stringer` annotations to `git.go` for `ErrorClass` and
`ErrorCode`. Added `generate` rule for `Makefile` to generate
string representations for these types (first building cgo files
in `_obj` dir to get C constants). Finally, updated `ci` actions
workflow to check that generated files are up to date.

Fixes: #543
(cherry picked from commit 5e35338)
lhchavez pushed a commit that referenced this pull request Nov 9, 2021
Added `stringer` annotations to `git.go` for `ErrorClass` and
`ErrorCode`. Added `generate` rule for `Makefile` to generate
string representations for these types (first building cgo files
in `_obj` dir to get C constants). Finally, updated `ci` actions
workflow to check that generated files are up to date.

Fixes: #543
(cherry picked from commit 5e35338)
lhchavez added a commit that referenced this pull request Nov 9, 2021
Added `stringer` annotations to `git.go` for `ErrorClass` and
`ErrorCode`. Added `generate` rule for `Makefile` to generate
string representations for these types (first building cgo files
in `_obj` dir to get C constants). Finally, updated `ci` actions
workflow to check that generated files are up to date.

Fixes: #543
(cherry picked from commit 5e35338)

Co-authored-by: Kirill <g4s8.public@gmail.com>
lhchavez added a commit that referenced this pull request Nov 9, 2021
Added `stringer` annotations to `git.go` for `ErrorClass` and
`ErrorCode`. Added `generate` rule for `Makefile` to generate
string representations for these types (first building cgo files
in `_obj` dir to get C constants). Finally, updated `ci` actions
workflow to check that generated files are up to date.

Fixes: #543
(cherry picked from commit 5e35338)

Co-authored-by: Kirill <g4s8.public@gmail.com>
lhchavez added a commit that referenced this pull request Nov 9, 2021
Added `stringer` annotations to `git.go` for `ErrorClass` and
`ErrorCode`. Added `generate` rule for `Makefile` to generate
string representations for these types (first building cgo files
in `_obj` dir to get C constants). Finally, updated `ci` actions
workflow to check that generated files are up to date.

Fixes: #543
(cherry picked from commit 5e35338)

Co-authored-by: Kirill <g4s8.public@gmail.com>
lhchavez added a commit that referenced this pull request Nov 9, 2021
Added `stringer` annotations to `git.go` for `ErrorClass` and
`ErrorCode`. Added `generate` rule for `Makefile` to generate
string representations for these types (first building cgo files
in `_obj` dir to get C constants). Finally, updated `ci` actions
workflow to check that generated files are up to date.

Fixes: #543
(cherry picked from commit 5e35338)

Co-authored-by: Kirill <g4s8.public@gmail.com>
lhchavez added a commit that referenced this pull request Nov 9, 2021
Added `stringer` annotations to `git.go` for `ErrorClass` and
`ErrorCode`. Added `generate` rule for `Makefile` to generate
string representations for these types (first building cgo files
in `_obj` dir to get C constants). Finally, updated `ci` actions
workflow to check that generated files are up to date.

Fixes: #543
(cherry picked from commit 5e35338)

Co-authored-by: Kirill <g4s8.public@gmail.com>
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

Successfully merging this pull request may close these issues.

Stringer for ErrClass and ErrCode ?
2 participants