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

Publish DafnyServer/Driver/Core to NuGet as well #2787

Merged

Conversation

robin-aws
Copy link
Member

@robin-aws robin-aws commented Sep 22, 2022

Fixes #2776: the root cause is that DafnyLanguageServer depends on DafnyServer, but the latter was never published. Also publishes the new DafnyDriver and DafnyCore packages I extracted out earlier, as otherwise the same problem would affect more packages on the next release.

Also replaces version.cs with the more automatic mechanism of a Build.Directory.props file, just as Boogie uses. The side effect is that the version is more consistently aligned across all the published packages. In particular it changes the current DafnyRuntime version from 1.2.0 to 3.8.1.40901 (or rather 3.9.0 by the time we release this).

I managed to augment the existing GHA that verifies the dafny dotnet tool to also do a very superficial verification that each library we publish can at least resolve all of its dependencies through NuGet.

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

Copy link
Member

@atomb atomb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good in itself, but I just noticed one other reference to version.cs, in Source/Dafny.sln. That should probably go away, too.

strategy:
fail-fast: false
matrix:
library-name: [ DafnyPipeline, DafnyLanguageServer, DafnyRuntime, DafnyCore, DafnyDriver ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this include DafnyServer?

Not that we have to do it as part of this PR, but it would be great if there were a way to automatically populate this list.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, definitely, will add.

I made an attempt at automatically populating this, but it's a bit non-trivial since dotnet install Dafny never works, as it complains that you're supposed to dotnet tool install that instead, so I'd at least need to special-case that package. Added a comment to that effect too.

@robin-aws robin-aws merged commit b5b9019 into dafny-lang:master Sep 23, 2022
@robin-aws robin-aws mentioned this pull request Sep 29, 2022
match = re.search(r'\[assembly:\s+AssemblyVersion\("([0-9]+.[0-9]+.[0-9]+).([0-9]+)"\)\]', fp.read())
# Checking Directory.Build.props
with open(path.join(SOURCE_DIRECTORY, "Directory.Build.props")) as fp:
match = re.search(r'\<VersionPrefix\>([0-9]+.[0-9]+.[0-9]+).([0-9]+)"\)', fp.read())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpitclaudel is going to repair this broken regex :-)

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.

DafnyLanguageServer NuGet package broken because DafnyServer isn't published
3 participants