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

DafnyLanguageServer NuGet package broken because DafnyServer isn't published #2776

Closed
robin-aws opened this issue Sep 20, 2022 · 3 comments · Fixed by #2787
Closed

DafnyLanguageServer NuGet package broken because DafnyServer isn't published #2776

robin-aws opened this issue Sep 20, 2022 · 3 comments · Fixed by #2787
Assignees
Labels
part: ci Issue is with Dafny's CI infrastructure release-blocker Must be resolved before the next release

Comments

@robin-aws
Copy link
Member

See https://www.nuget.org/packages/DafnyLanguageServer: clicking on the DafnyServer link under Dependencies leads to a 404, and similarly a test project that depends on DafnyLanguageServer fails to restore for the same reason.

I'm not yet sure why this isn't an issue with DafnyPipeline depending on DafnyCore, which also isn't published. It seems like the packaging process just inlined DafnyCore there instead.

We also need a mechanism similar to release-downloads-nuget.yml that attempts to use the other packages we are publishing, to catch issues like this ideally during the nightly build, or at the very least immediately after releasing.

@robin-aws robin-aws added release-blocker Must be resolved before the next release part: ci Issue is with Dafny's CI infrastructure labels Sep 20, 2022
@robin-aws robin-aws self-assigned this Sep 20, 2022
@robin-aws
Copy link
Member Author

I suspect this isn't a problem with DafnyPipeline because DafnyCore has <IsPackable>false</IsPackable> in its csproj file, so packaging likely includes such packages in consuming packages directly.

@robin-aws
Copy link
Member Author

Correction, I was thrown off by the fact that I added the release note about the PR that introduced DafnyCore to the wrong section of RELEASE_NOTES.md. :) That change hasn't been released yet, and I can see that we have the same issue with the nightly releases of DafnyPipeline: https://www.nuget.org/packages/DafnyPipeline/3.8.0.40729-nightly-2022-09-19-e5622c4#dependencies-body-tab

The only reasonable fix seems to be ensuring that all dependencies of each Nuget-published package are also Nuget-published!

@robin-aws
Copy link
Member Author

robin-aws commented Sep 20, 2022

The root cause for why DafnyServer is not being published is that it was missing <OutputPath>..\..\Binaries\</OutputPath>, and so its .nuget file isn't being picked up by this command: https://github.com/dafny-lang/dafny/blob/master/.github/workflows/publish-release-reusable.yml#L97

robin-aws added a commit that referenced this issue Sep 23, 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part: ci Issue is with Dafny's CI infrastructure release-blocker Must be resolved before the next release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant