Stream: C#/.net-collaboration

Topic: Default access modifier for generated code


view this post on Zulip Joel Dice (Jun 11 2024 at 15:00):

I'm working on adding wasi:http support to System.Net.Http, and part of that requires generating bindings for wasi:http and adding them to src/libraries/System.Net.Http/src in the .NET runtime source tree. That results in hundreds of compiler errors (including warnings treated as errors), so I'm working on cleaning those up.

Some of the errors are about CLS conformance, i.e. the compiler (or linter) complaining that the public API of the generated code is not language-agnostic. But in this case (and probably in most cases), we don't even want the generated code to be part of the public API. So three options come to mind:

Thoughts?

view this post on Zulip Scott Waye (Jun 11 2024 at 17:43):

First one seem good to me.

view this post on Zulip Joel Dice (Jun 11 2024 at 18:19):

I went ahead and implemented the third option since it's a superset of the first one and easy enough.


Last updated: Dec 13 2025 at 17:03 UTC