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

semconvgen: panic: unable to exe when specification version is set #41

Open
MrAlias opened this issue Oct 21, 2021 · 2 comments
Open

semconvgen: panic: unable to exe when specification version is set #41

MrAlias opened this issue Oct 21, 2021 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@MrAlias
Copy link
Contributor

MrAlias commented Oct 21, 2021

$ .tools/semconvgen -i ~/code/opentelemetry-specification/semantic_conventions/resource -s "v1.7.0" -t semconv/template.j2
panic: unable to exec /usr/bin/git worktree add /tmp/otel_semconvgen1125124/input v1.7.0: exit status 128

goroutine 1 [running]:
main.main()
	/home/tyler/go/pkg/mod/go.opentelemetry.io/build-tools/semconvgen@v0.0.0-20210920164323-2ceabab23375/generator.go:59 +0x42e

Version: go.opentelemetry.io/build-tools/semconvgen v0.0.0-20210920164323-2ceabab23375

@MrAlias MrAlias added the bug Something isn't working label Oct 21, 2021
@MrAlias
Copy link
Contributor Author

MrAlias commented Oct 21, 2021

Seems to have been caused because the v1.7.0 tag was checked out to a v1.7.0 branch in the specification repository (git checkout tags/v1.7.0 -b v1.7.0).

Ideally this wouldn't be panic.

@pellared pellared added good first issue Good for newcomers help wanted Extra attention is needed and removed good first issue Good for newcomers help wanted Extra attention is needed labels Jun 20, 2023
@pellared
Copy link
Member

I think the proper fix is to improve the error handling and tell that git worktree add failed. Maybe the command is emitting something to stdout/stderr that is worth printing? I would not like to run worktree add with -f flag, because it can be dangerous as it will create a "linked worktree" that will modify the existing one.

@pellared pellared added good first issue Good for newcomers help wanted Extra attention is needed labels Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants