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

Disable warning 70 or generating an interface file #35

Closed
fangyi-zhou opened this issue Sep 8, 2022 · 3 comments
Closed

Disable warning 70 or generating an interface file #35

fangyi-zhou opened this issue Sep 8, 2022 · 3 comments

Comments

@fangyi-zhou
Copy link

Hi, I'm wondering whether it would be appropriate to add a flag to emit a suppression of warning 70 (missing mli file), or a flag to generate an interface file. In either case, I'm happy to submit a pull request.

@andersfugmann
Copy link
Contributor

Emitting a .mli file is a lot of work, and I hardly see any value in generting .mli files when the .mli file exposes the same signature as inferred signature of the .ml file.

But I don't see any harm in disabling warning 70 in the auto-generated files.

@fangyi-zhou
Copy link
Author

It seems that [@@@warning "-70"] does not suppress the warning, I guess the supression needs to be done manually in compilation flags. Please feel free to close this issue.

See ocaml/RFCs#26 ocaml/ocaml#10319

@andersfugmann
Copy link
Contributor

I assume that you have enabled warning 70 on your project which is why you see this error.
One solution for you could be to place all protoc auto generated files in a separate library (if you are using dune to control the build process), and disable warning 70 when compiling the library).

Closing for now.

crackcomm pushed a commit to crackcomm/ocaml-protoc-plugin that referenced this issue Jul 20, 2024
Improve documentation emittet for oneof fields
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

No branches or pull requests

2 participants