Rename module Math->MathLib, name conflicts with Java/C# Math class#146
Rename module Math->MathLib, name conflicts with Java/C# Math class#146markrtuttle wants to merge 1 commit intodafny-lang:masterfrom
Conversation
d2a41ad to
5dd0601
Compare
robin-aws
left a comment
There was a problem hiding this comment.
Thanks for reporting this issue and the proposed fix. I'm not yet sure I want to merge it, though, because it will be a breaking change for anyone using the module, and more importantly hides the underlying issue: code compiled from Dafny should not be dumped into the top-level namespace, where these kinds of conflicts could easily occur for other names in the future as well.
I'd also like to get to the bottom of why the CI didn't catch #145 before we resolve it.
Fortunately we're already working on supporting configuring the parent namespace for compiled code: dafny-lang/dafny#4322. We should definitely use that feature when building library code like this to avoid these problems in general.
The old Math module conflicts with the Java and C# module. This change moved the Math module out of the top-level namespace.
5dd0601 to
8143845
Compare
|
@robin-aws I've pushed an update that merely moves Math into Dafny.Math. |
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.
This renames the Math module to MathLib to avoid conflict with the Math class in Java and C#. Prior to this change, the examples in JSON will verify but not compile to Java or C# (error messages about missing symbols indicate the compiler is looking in the standard Math library and not the Dafny Math module).
This does not update the corresponding files under examples. Should it?
This resolves #145