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

Update release process to include building a Dafny that's usable on M* Macs. #2889

Closed
keyboardDrummer opened this issue Oct 13, 2022 · 5 comments · Fixed by #3033
Closed
Assignees
Labels
kind: enhancement Enhancements, feature requests, etc. These are NOT bugs, but ways we can improve Dafny part: ci Issue is with Dafny's CI infrastructure

Comments

@keyboardDrummer
Copy link
Member

keyboardDrummer commented Oct 13, 2022

Many Dafny users have trouble installing Dafny on their Mac:

Instead of making it easier for these users to build Dafny from source on their M* Mac, which so far has been an error prone process, we should ensure new versions of Dafny include a M* Mac build.

Implementation A

Use dotnet cross-compilation to let our GitHub actions MacOS machine build for both x64 and arm64. This can be done using the --arch option of dotnet: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-build#options

Implementation B

Build a platform independent Dafny, which requires dotnet to be installed on the machine, and which does not include a Z3 binary. The Dafny VSCode extension will have to be updated so that it installs dotnet and downloads Z3.

Implementation C

Build a platform independent Dafny, which requires dotnet to be installed on the machine, and which includes the MacOS M* Z3 binary. The Dafny VSCode extension will have to be updated so that it installs dotnet.

@keyboardDrummer keyboardDrummer added the kind: enhancement Enhancements, feature requests, etc. These are NOT bugs, but ways we can improve Dafny label Oct 13, 2022
@MikaelMayer
Copy link
Member

I would prefer an alternative that does not depend on AWS if possible? But I am not knowledgeable enough.

@keyboardDrummer
Copy link
Member Author

keyboardDrummer commented Oct 13, 2022

I would prefer an alternative that does not depend on AWS if possible? But I am not knowledgeable enough.

I think there could be several options available at the same time, AWS being just one of them. For AWS, I think the step of how to get an AWS account might be left out of the release manual since this GitHub organisation doesn't have any AWS budget. It'll be up to individual contributors to for example use the AWS free tier or other resources to use AWS, or use an alternative to AWS such as a personal M1 mac.

@keyboardDrummer keyboardDrummer changed the title Update release process to include building Dafny for M* Macs. Update release process to include building a Dafny that's usable on M* Macs. Oct 14, 2022
@cpitclaudel
Copy link
Member

Option B sounds like a strict improvement over what we have now, right? (Since we require dotnet to build Dafny today on M*s.)

That said, I didn't follow the M* issues very closely, but is there a dotnet bug that prevents us from cross-compiling for that platform?

@keyboardDrummer
Copy link
Member Author

That said, I didn't follow the M* issues very closely, but is there a dotnet bug that prevents us from cross-compiling for that platform?

Just tried it and it seems to work, at least for building for arm64 on my x64 laptop, although I only tested the building not running it on an M*.

This seems like the best approach then.

@prvshah51 prvshah51 self-assigned this Oct 21, 2022
@MikaelMayer
Copy link
Member

Related PR that should make the vscode extension installation process more reliable on M* Macs:
dafny-lang/ide-vscode#287

@keyboardDrummer keyboardDrummer added the part: ci Issue is with Dafny's CI infrastructure label Nov 7, 2022
robin-aws added a commit that referenced this issue Nov 14, 2022
Fixes #2889 

The packaging script is using Z3 version names to identify and publish
Dafny Binaries for various OS and Architecture but as Z3 4.8.5 doesn’t
have a version for osx-arm64 , here the changes are copying info from
osx-64 and changing it to publish for M* macbooks.

<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: Parva Shah <[email protected]>
Co-authored-by: Robin Salkeld <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement Enhancements, feature requests, etc. These are NOT bugs, but ways we can improve Dafny part: ci Issue is with Dafny's CI infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants