Clean up error messages for container scenarios #221
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
cc @juliobbv Since you are also doing some cleanup work
Do either of you have opinions on changing some of these #if directives to plain c#? I think in general its more readable, and lets us remove a few specific cases of
#pragma warning disable CS1998
where we are suppressing a warning only introduced because of the directives. Its also useful for when you are building on eg Windows, and may accidentally have some compile error in a !OS_WINDOWS block that only fails during CI. Similarly, the intellisense / finding references stuff seems to work better without the directives because it can find references to code made from inside those directive blocks, eg a reference to a function that is only called on linux and you are developing on windows or vice versaOn the other hand, I think it will generate a slightly larger assembly (looks like with these changes, the layout dir is ~1-2kb larger, which is probably negligible, and may also be due to other reasons), it will add an extra if check at runtime, but its just comparing static values and might get optimized out anyways (but could still be the source of a bug or error), and is a bit more verbose
Just wanted to get some early feedback before I finish the rest of this, totally fine sticking with the existing pattern of using directives for platform specific behavior