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

[swift]: add support for dev snapshots and add 6.1 #1497

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jamieQ
Copy link
Contributor

@jamieQ jamieQ commented Jan 16, 2025

  • adds a new 'dev-snapshot' nightly config entry
  • configures this to output these dev compilers to a swift-dev-snapshot directory
  • sets the current target to fetch Swift 6.1 dev snapshots. this value is expected to need to be updated when new future releases are cut

dev-snapshot:
dir: swift-dev-snapshot
type: restQueryTarballs
install_always: true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

question for the maintainers: Swift typically has ~2 or so active pre-release branches per year. these generally are built with about the same frequency as the nightlies, but once a new release branch is cut, updated builds for old ones will cease (presumably).

so i'm wondering – is install_always appropriate here? i didn't entirely chase down the logic that it entails... but i guess the concern would be if the development snapshot version here becomes out of date (since it will require manual updating by someone currently), it might end up wasting bandwidth.

Copy link
Member

Choose a reason for hiding this comment

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

Hi @jamieQ - thanks for the question. install_always does indeed force it to install every time without checking.

For other nightlies we check a dated directory and so only install at most once a day, but that's special cased for the installer types that are "nightly" in nature. I think we can start with install_always and then work from there though if it becomes a problem.

@jamieQ jamieQ marked this pull request as ready for review January 16, 2025 05:21
@@ -36,6 +36,17 @@ compilers:
- '5.9'
- '5.10'
- '6.0.3'
dev-snapshot:
Copy link
Member

Choose a reason for hiding this comment

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

This should be in the if: nightly section though, else it really will install every time anyone tries to install anything as opposed to our specific "nightly" install. In fact it looks like almost everything can be shared with the nightly section instead of copy pasting it?

+ '/' + document['dir'] \
+ '/' + document['download']
targets:
- '6.1'
Copy link
Member

Choose a reason for hiding this comment

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

I think (for example) you could just add - '6.1' to the targets: of the nightly block below, though it looks like this is a different ubuntu version? Should we update the nightly to be 2204 too?

(to test a local install you'd need to use:
ce_install --enable nightly install swift
or similar)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mattgodbolt thanks for the feedback!

I think (for example) you could just add - '6.1' to the targets: of the nightly block below

from what i can tell, the URL is slightly different for the two flavors of dev builds. what i was trying to accomplish was to leave the existing nightly as-is (it fetches the main branch snapshot), and add a new one that can be periodically updated to use the next planned release version dev branch (version 6.1 as of now). here's an updated config that seems like it accomplishes this with a bit less duplication:

    nightly:
      if: nightly
      type: restQueryTarballs
      install_always: true
      toolchain: development
      url: https://download.swift.org/{toolchain}/ubuntu2004/latest-build.yml
      query: |
        'https://download.swift.org/{toolchain}/ubuntu2004' \
        + '/' + document['dir'] \
        + '/' + document['download']
      targets:
        - nightly
      dev-snapshot:
        dir: swift-dev-snapshot
        toolchain: swift-{name}-branch
        targets:
          - '6.1'

does this look okay to you? i must admit i don't quite understand how the config structure and substitutions work so i apologize if this is a bit naive.

it looks like this is a different ubuntu version? Should we update the nightly to be 2204 too?

this was an oversight on my part – i didn't intend to diverge from what was already here. as a slight aside: i am not particularly familiar with the Swift on Linux ecosystem – is there a reason to prefer the newer ubuntu versions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i've optimistically pushed an update with changes along these lines. do let me know if there's anything else that seems off with this new config entry!

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.

2 participants