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

Avoid name clashes with Default method #6031

Merged
merged 49 commits into from
Jan 13, 2025

Conversation

olivier-aws
Copy link
Contributor

@olivier-aws olivier-aws commented Jan 9, 2025

What was changed?

Avoid name clash between user defined and Dafny generated Default method for data types.

How has this been tested?

Add test Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3809.dfy

Fixes #3809

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@olivier-aws olivier-aws changed the title Fix 3809 Avoid name clashes with Default method Jan 9, 2025
olivier-aws and others added 19 commits January 9, 2025 09:49
### Description
- Use .NET 8.0 instead of 6.0 throughout the project
- Make the ordering of diagnostics deterministic even when multiple
diagnostics differ only in their related locations

### How has this been tested?
- Updated existing tests to match well-defined ordering

<small>By submitting this pull request, I confirm that my contribution
is made under the terms of the [MIT
license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>

---------

Co-authored-by: Remy Willems <[email protected]>
Fixes dafny-lang/ide-vscode#514

### What was changed?
Set a default verification time limit

### How has this been tested?
Added a CLI test that checks there is a default time-out

<small>By submitting this pull request, I confirm that my contribution
is made under the terms of the [MIT
license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
### What was changed?
- Remove the
`<RuntimeIdentifier>$(RUNTIME_IDENTIFIER)</RuntimeIdentifier>` property
from csproj files that was needed as a workaround but may break things
in .NET 8 according to SO
- Remove references from DafnyDriver to DafnyServer, that prevented
publishing correctly with .NET 8
- Stop publishing DafnyLanguageServer since it's not used directly.

### How has this been tested?
Tested by existing tests

<small>By submitting this pull request, I confirm that my contribution
is made under the terms of the [MIT
license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
### What was changed?
The Dafny legacy CLI shows part of a .NET error message as part of it
UI. This can not be tested well since the specific error message is not
defined as part of .NET, and can be different across .NET versions and
platforms.

On Windows it returns:
`Invalid filename: The value cannot be an empty string. (Parameter
'path')`
On other platforms it is:
`Invalid filename: The path is empty. (Parameter 'path')`

Instead of fixing the legacy CLI to remove the ambiguity, I'm removing
the test for that ambiguous behavior since the old CLI is deprecated.

### How has this been tested?
Removed a test

<small>By submitting this pull request, I confirm that my contribution
is made under the terms of the [MIT
license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
@olivier-aws olivier-aws marked this pull request as ready for review January 13, 2025 14:46
@olivier-aws olivier-aws linked an issue Jan 13, 2025 that may be closed by this pull request
@olivier-aws olivier-aws merged commit e7e3ed4 into dafny-lang:master Jan 13, 2025
22 checks passed
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.

Clash when compiling a datatype containing a static const Default
4 participants