Skip to content

Conversation

@MOmarMiraj
Copy link
Contributor

@MOmarMiraj MOmarMiraj commented Nov 18, 2024

As apart of !184 there has been a regression as if you build typeshare with all features and are typesharing not in Golang, the assert_go_package_is_present function will still be ran even though your generating for another language

Updated the code to only run the function if the language of the types being converted is Golang.

To test:
Download the latest typeshare-cli from main and try generating types for any language but Go without a --go-package in the cmd and a package in the typeshare.toml.Should error out with:

[2024-11-18 15:50:43.169602 -05:00] INFO [typeshare] cli/src/main.rs:49: typeshare started generating types
Error: Please provide a package name in the typeshare.toml or using --go-package <package name>

Try the same thing but install from my branch like so:

	cargo install --git https://github.com/MOmarMiraj/typeshare --branch omar/fix-go-package --features go

and should work as expected.

Copy link
Member

@darrell-roberts darrell-roberts left a comment

Choose a reason for hiding this comment

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

Requested change.

@darrell-roberts darrell-roberts merged commit e0e5f27 into 1Password:main Nov 18, 2024
6 checks passed
@MOmarMiraj MOmarMiraj deleted the omar/fix-go-package branch November 18, 2024 21:45
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.

2 participants