Skip to content

Generate stringer files automatically - #841

Merged
lhchavez merged 6 commits into
libgit2:mainfrom
g4s8:543-stringer-generate
Nov 8, 2021
Merged

Generate stringer files automatically#841
lhchavez merged 6 commits into
libgit2:mainfrom
g4s8:543-stringer-generate

Conversation

@g4s8

@g4s8 g4s8 commented Oct 14, 2021

Copy link
Copy Markdown
Contributor

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: #543

@lhchavez lhchavez left a comment

Copy link
Copy Markdown
Contributor

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!

Comment thread .github/workflows/ci.yml Outdated
Comment thread Makefile Outdated
Apply review comments about stringer workflow steps

Co-authored-by: lhchavez <lhchavez@lhchavez.com>
@g4s8

g4s8 commented Nov 8, 2021

Copy link
Copy Markdown
Contributor Author

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

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

Co-authored-by: lhchavez <lhchavez@lhchavez.com>
Comment thread .github/workflows/ci.yml
Co-authored-by: lhchavez <lhchavez@lhchavez.com>
@g4s8
g4s8 requested a review from lhchavez November 8, 2021 14:29
@g4s8

g4s8 commented Nov 8, 2021

Copy link
Copy Markdown
Contributor Author

Exported GOPATH in 9c737a6

@lhchavez lhchavez left a comment

Copy link
Copy Markdown
Contributor

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