Swift to participate in GSoC 2021!

Currently, we are using https://github.com/apple/swift/blob/main/utils/build-windows.bat in Swift Community-Hosted CI. It would be great to have consistency between all of the platforms (build-script).

@compnerd would be the right person to provide more information about the Windows build system.

If I understand it correctly, the focus for the GSoC project would be to migrate build-windows.bat over to build-script, which can be done without access to the CI servers. Once the build-script is updated to support Windows build, I can update the CI job to use the new build-script preset.

It’s certainly better to use the same build-script across all the platforms if possible. What I originally intend is that the participant may write a more powerful build script for Windows which can support features like cache, test and smoke tests. We can then:

  • Make toolchain development on Windows far more efficient;
  • Require tests and smoke tests on Windows for future patches, making sure that a change won’t break Windows build;
  • Get the Windows toolchain as an artifact of CI, which doesn’t rely on @compnerd ‘s Azure CI any more.

If we can finally use build-script on Windows, another benefit we’ll get is that toolchains on all platforms would share the same layout, though the current layout may be significantly changed on Windows.

This is already effectively done. The build-windows.bat already does the pre-commit CI testing. The commands are also documented.

Could you elaborate on this? I believe that the windows toolchain development is already quite efficient.

This is already done. There is pre-commit CI for the toolchain.

There are additional pieces which are needed for packaging - an unpackaged toolchain is ~10x larger (~4GiB vs 400 MiB) but possible already with the pre-commit CI.

1 Like

I’ll check it out. It doesn’t quite make sense to me because I’m focusing on Core Libraries and Developer Tools, which build-windows.bat currently lacks support of.

I suppose there isn’t check for Windows for corelibs and other related projects, due to the same reason addressed above?

The reason for the related projects not being tested is capacity. If you can provide hosts for CI, I think that resolving that it would be quite possible.

I think that what would be more useful than build-script would be reworking the tree layout to not have deep paths. There are a few cases where we have >256 characters in paths which is a bigger problem and crops up more commonly with the CI infrastructure.

Just to post an idea if anyone wants to take it on; SPM dependency pre-built caches.

We have a number of dependencies which take a significant time to build so we pre-build them to a cache for our CI. Each CI job then pulls in the cache and saves a significant time on each CI run.

Currently we do this though a combination of Carthage and our own tooling but really want to use SPM. This is one of the last major stumbling blocks for us to adopt it.

2 Likes

I'm happy to confirm Swift was accepted as participating organization in this years Google Summer of Code! :partying_face:

Now is a good time to continue looking into the project proposals, talk to mentors, and generally prepare for the next milestone, which will be:

  • March 30 - April 13 - Student Application Period
16 Likes

Hassan posted a nice experience report from his last year over here: My GSoC Experience

It can be useful for first-time GSoC students – so if that's you – you might want to give it a read :slight_smile:

3 Likes

Hello,

I would like to suggest a few ideas for GSoc 2021 for the Swift world, I hope that this is the right place to make this proposal.

Swift on Windows

Windows now uses a binary format (ECMA-based) to describe the shape of the OS APIs. This capability is now used to produce both Rust and C# APIs that give access to the entire set of Windows APIs.

There are already MIT-licensed C# and Rust implementations of this bridge, and could serve as a blueprint to do this. It would allow Swift to be a first class citizen in Windows.

This can be completed during the summer.

Swift on Android

While there is an effort to support Swift on Android, it would be great to create a binding generator that would surface the Android API to Swift developers. Xamarin's open sourced tools have enough support to turn arbitrary Android APIs into C# APIs, and could be used as a reference.

I do not believe that the summer would be enough to complete the work, but it could certainly make some progress in that direction.

Fund TokamakUI

The Tokamak folks have built a SwiftUI engine that runs on WebAssembly and to some extend on Linux. It would be great to fund this effort to get this SwiftUI-like platform to be both more complete, and more polished.

Very good fit for summer of code.

"Swift Tool" support

I would love to have a way of creating command line tools in Swift installed into the system, or for the user, similar to npm install which can turn the project into a command line tool that is installed into the system. This would make it convenient to distribute Unix commands written in Swift.

This would extend SwiftPM, so I would envision:

$ swift install --global

Very good fit for a summer of code event.

10 Likes

I’ve touched this point in [Pitch] SwiftPM support for Swift scripts (revision), part of which going to be my choice for GSoC project. You can check the “Alternative considered” part for an alternative solution which I think is better.

1 Like

The student submission period has officially ended -- thanks everyone!

We received a lot of proposals and will take the next weeks to review and decide which we'd like to request slots for and eventually accept.

Please be patient and look forward to the final student+project announcements on May 18th 2021 :partying_face:

8 Likes

Hello everyone,
I'm happy to announce the 5 (!) accepted projects for this year's Swift in GSoC! :partying_face:

  • SwiftPM support for Swift scripts
  • Inlay type hints for SourceKit-LSP
  • Alive2 for SIL
  • A "Bite-Sized" BitArray
  • Shared Storage for Property Wrappers

Details about the accepted projects can be found here: Google Summer of Code

Students and mentors should have already received emails via the gsoc tool and should be now kicking off the "bonding period" of the process :slight_smile:

We're looking forward to seeing the projects progress and complete sucessfully -- best of luck to all of you!

I'd also like to thank all other students for their submissions: thank you for wanting to help make Swift better and perhaps you'd have a chance next year to apply again?

21 Likes

Are there links to project texts/scope one could follow? I'm curious about the details of some of these endeavors!

2 Likes

You can see the abstracts here

3 Likes

Thanks @stevapple, added that link to the post!

1 Like

@rauhul this is the link to the Alive2 for SIL project proposal.

3 Likes

Respected sir,
I am Shilpee Gupta, a second-year undergraduate student at Indira Gandhi Delhi Technical University For Women India. I am well aware of Swift, Linux, and c++.

I learned how to install the workflow from Hassan's post on the Swift forum. I read about the swift compiler, standard libraries, package manager, core libraries, swift on the server, REPL playground, and debugger from the Swift website.

I would love to contribute to Swift organization for GSoC 2022 but could you please tell me how should I start from here and learn the prerequisites enough for GSoC 2022.

I wanted to know if you have any projects left in 2021 yet to be implemented in 2022?
Thanks and Regards
Shilpee Gupta

Hi Shiplee,
I replied to your email -- please pick one form of communication, it does not help sending the same message over many different channels :slight_smile:

We're not ready yet to share anything about future GSoC participation -- please stay in touch next year.
In the meantime you can try to start a little bit with picking some simpler tasks and ask around on the forums where you could help and/or learn how to contribute.

Hope this helps,

@ktoso can I have your email please ?

(post deleted by author)