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

fix(grpcgen): remove ambiguous message about missing --file when using compilation database #23

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jim-bcom
Copy link

When using a compilation database, a message stating that the "File was missing" was printed, leading to think something was wrong whereas it's expected behavior.

Also:

  • perform option validation to keep --file and --database_dir mutually exclusive (if both options were set, only file was taken)
  • handle parsing error (used to be ignored for --database_dir path)

…g compilation database

When using a compilation database, a message stating that the "File was missing" was printed,
leading to think something was wrong whereas it's expected behavior.

Also:
- perform option validation to keep --file and --database_dir mutually exclusive
- handle parsing error (used to be ignored for --database_dir path)
Copy link
Collaborator

@AdrienSchadle AdrienSchadle left a comment

Choose a reason for hiding this comment

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

Ok for me

@jim-bcom jim-bcom marked this pull request as draft February 26, 2024 08:44
Options --file and --database_dir are actually not mutually exclusive.
When parsing a file, the compilation database is used to resolve symbols
when passed to initOptions().

Change "File is missing" by a message that sounds less as an error.
@jim-bcom jim-bcom force-pushed the fix/grpcgen-cli-file-vs-db branch from f7995cc to bc064b5 Compare February 26, 2024 13:21
@jim-bcom jim-bcom marked this pull request as ready for review February 26, 2024 13:21
@jim-bcom
Copy link
Author

Reverted the check for mutual exclusion of --file and --database_dir. Turns out, they're not mutually exclusive.
There may be some refinements needed on how to manage --database_dir, --database_file and --file, but for now, this PR only aims at changing the message logged when --file is not set.

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