Commit Graph

429 Commits

Author SHA1 Message Date
Mishal Shah
e2b904ea79 Update the rebranch scheme to include "stable/20221013" 2022-10-28 15:35:03 -07:00
Erik Eckstein
1bc2b5a8fe rebranch: switch to llvm's stable/20221013 branch 2022-10-28 09:33:50 +02:00
Anthony Latsis
04b1ff9991 update-checkout: Do not update repository if not listed in the given branch-scheme
Consider two branch-schemes, where the second is a subset of the first.
Suppose repositories have been cloned using the first branch scheme. Previously,
a successive update using the second branch-scheme would cause update-checkout
to fail in an attempt to query the branch-scheme about the target branch for a
repository it does not map, even though the update, given no further errors, can
be considered successful.
2022-09-24 06:06:08 +03:00
Josh Soref
caad9245f6 spelling: platform
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-09-15 19:43:37 -04:00
YOCKOW
c1e154a9cb [Gardening] Remove trailing whitespaces in Python scripts. (W291)
That has been marked as 'FIXME' for three years.
This commit fixes it.
2022-08-25 16:08:36 +09:00
Mishal Shah
59db203890 Update the llvm-project branch for main to stable/20220421 2022-08-12 08:56:12 -07:00
nate-chandler
8898b5a855 Merge pull request #60440 from nate-chandler/update-checkout/swift-format/release/5.4
Fixed release/5.4's update-checkout swift-format.
2022-08-08 12:54:24 -07:00
Nate Chandler
d2c3524d6e Fixed release/5.4's update-checkout swift-format. 2022-08-08 08:29:05 -07:00
Egor Zhdan
a9bd9725d0 [build] Checkout Swift LLVM Bindings repo 2022-07-21 19:25:04 +01:00
Kavon Farvardin
e2ab3b3155 add --all-repositories flag
Sometimes when working with Docker to debug a Linux issue, we want
to copy the sources directory into the Docker image. If we have a
checkout that was done on macOS, then repos needed to build those
same sources on Linux, such as `icu` will not be included. There
was no way to ask `update-checkout` to download those repos while
on macOS.

With `--all-repositories`, you can now ask for those repos, despite
them not being needed on macOS. You can even do

`--all-repositories --skip-repository icu` to include all platform
specific repositories, but skip `icu`.
2022-06-29 10:15:47 -07:00
Mishal Shah
a8ad273bca Add cmark gfm info back 2022-06-17 09:36:10 -07:00
swift-ci
c95db5ed7f Merge pull request #39176 from apple/maxd/checkout-json-formatting
Fix formatting in `update-checkout-config.json`
2022-06-16 12:14:25 -07:00
Victoria Mitchell
4ac519532b stop cloning swift-cmark twice
rdar://90461570
2022-06-13 13:40:58 -06:00
Mishal Shah
d292a852d8 Merge pull request #40188 from apple/QuietMisdreavus/cmark
use swift-cmark/gfm instead of /main
2022-05-02 10:20:23 -07:00
Mishal Shah
c3aa092630 Update the scheme for rebranch to support stable/20220421 2022-04-25 10:37:14 -07:00
Richard Wei
f1c0d10af0 Update string processing checkout for 5.7-04182022.
swift/release/5.7-04182022 will be the corresponding branch.
2022-04-22 12:09:58 -07:00
Mishal Shah
db4de1efcb Update update-checkout-config.json 2022-04-21 09:57:47 -07:00
Mishal Shah
8b9248ab45 Add new branch scheme 2022-04-20 10:20:29 -07:00
Mishal Shah
b4f380d973 Revert "[utils] update-checkout: Reduce environment variable noise" 2022-04-07 09:39:27 -07:00
Karoy Lorentey
f92d8326e9 Merge branch 'main' into silence-envvars 2022-04-05 21:38:22 -07:00
Mishal Shah
8851752fc3 Fix typo in the version 2022-04-04 23:07:50 -07:00
Mishal Shah
2eee53bb42 Add support for release/5.7 branch 2022-04-04 22:34:29 -07:00
Mishal Shah
8c21aaf477 Merge pull request #41588 from rxwei/string-processing-swift-main
[update-checkout] Switch string processing to swift/main
2022-03-17 10:11:39 -07:00
Victoria Mitchell
455cdbc5a7 use swift-cmark/gfm instead of /main 2022-03-16 14:56:21 -06:00
Gwynne Raskind
69e97d2ed8 Merge branch 'main' into patch-1 2022-03-12 03:32:30 -06:00
Karoy Lorentey
e1c765abc7 [utils] Submit to the whims of the whitespace police 2022-03-11 16:38:33 -08:00
Karoy Lorentey
c1df51e6b6 [utils] update-checkout: Reduce environment variable noise 2022-03-10 16:50:13 -08:00
Karoy Lorentey
4f9cf1da04 [utils] update_checkout: During parallel execution, prefix each printed line with the repo name 2022-03-08 20:08:14 -08:00
Karoy Lorentey
bcddc9b7b9 [utils] Force subprocess output to be read in text mode
In Python 3, subprocess output is read as binary data by default, which isn’t what we want.

Instead of reading process output as byte strings, then manually decoding them into strings, simply pass `text=True` to functions in the `subprocess` module, so that we get properly decoded strings right out the box.

This fixes places that forget to do the decoding step — most especially, the `update-checkout` script. That script prints Git output as byte strings, which leads to unreadable results.

Additionally, in shell.run, use the same pipe for capturing both stdout and stderr. The distinction is pretty pointless in this use case; however, keeping the two channels separate means that we lose the original ordering of printed messages, which does matter.
2022-03-07 16:59:36 -08:00
Richard Wei
9a82a8f2e9 [update-checkout] Switch string processing to swift/main
Switch to using swift/main as the integration branch for apple/swift-experimental-string-processing.

Integration process documentation: apple/swift-experimental-string-processing#170
Friend PR: apple/swift-experimental-string-processing#192
2022-02-28 12:37:21 -08:00
Mishal Shah
b2943e6521 Merge pull request #41430 from hamishknight/choose-your-delimiter
Update regex literal delimiters
2022-02-28 10:19:51 -08:00
Hamish Knight
611fd33f58 Update regex literal delimiters
Update the lexing code for the replacement of the
`'/.../'` and `'|...|'` delimiters with `#/.../#`
and `#|...|#` respectively, in addition to
allowing the `re'...'` delimiter.
2022-02-24 17:37:16 -08:00
Saleem Abdulrasool
51b9ff4841 update_checkout: bump Yams to 5.0.0 2022-02-19 10:49:06 -08:00
Richard Wei
1b83efb512 Revert "Revert "[Regex] Switch regex match to Swift tuples."" 2022-02-11 01:32:45 -08:00
Mishal Shah
dcd9e8e84e Revert "[Regex] Switch regex match to Swift tuples." 2022-02-10 15:21:53 -08:00
Richard Wei
7179a8d4ba Merge pull request #41275 from rxwei/regex-update-dev-6
[Regex] Switch regex match to Swift tuples.
2022-02-10 11:19:54 -08:00
Richard Wei
cf8e0fea12 [Regex] Switch regex match to Swift tuples.
Typed captures no longer use ad-hoc nominal tuples. We use Swift native tuples instead. See apple/swift-experimental-string-processing#127.

Update checkout tag to dev/6.
2022-02-09 16:21:57 -08:00
Anders Bertelrud
182e194b7e Bump SwiftArgumentParser checkout to 1.0.3. 2022-01-31 21:49:12 -08:00
Max Desiatov
53d8c59cd0 Fix formatting in update-checkout-config.json
3-spaces formatting is inconsistently used for some keys instead of 4 spaces. This change makes the formatting consistent in `update-checkout-config.json`.
2022-01-20 10:17:29 +00:00
Mishal Shah
070fb8f1c7 Update the main scheme llvm-project branch to stable/20211026 2022-01-18 19:23:21 -08:00
Mishal Shah
ee3e72f0d6 Update the branch for swift-installer-scripts to release/5.6 2022-01-17 14:13:08 -08:00
Pavel Yaskevich
4eabfa9354 [update-checkout] Fetch if the local branch/tag doesn't exist
Dependencies are usually updated to a different branch/tag name
when new versions get new released, but local checkout might not
have that fetched yet, so if initial checkout fails, let's fetch
before attempting to checkout.
2022-01-12 13:06:54 -08:00
Richard Wei
e5175d595e [Regex] Infer 'Match' type of regex literals.
Applies swift-experimental-string-processing#68 in regex literal type inference. Regex literals with captures will have type `Regex<Tuple{n}<Substring, {Captures...}>>`. This is a temporary thing that allows us to define generic constraints on captures. We will switch back to native tuples once we have variadic generics.
2022-01-06 10:54:10 -08:00
Richard Wei
1b3c0b7a73 [Regex] Infer capture types of regex literals.
When parsing a regular expression literal, accept a serialized capture structure from the regex parser. During type checking, decode it and form Swift types.

Examples:
```swift
'/(.)(.)/' // ==> `Regex<(Substring, Substring)>`
'/(?<label>.)(.)/' // ==> `Regex<(label: Substring, Substring)`
'/((.))*((.)?)/' //==> `Regex<([Substring], [Substring], Substring, Substring?)>`
```

Also:
- Fix a bug where a regex literal parsing error is not returning an error parser result.

Note:
- This needs to land after apple/swift-experimental-string-processing#92 and after `dev/4` tag has been created.
- See apple/swift-experimental-string-processing#92 for regex parser changes and the capture structure encoding.
- The `RegexLiteralParsingFn` `CaptureStructureOut` pointer type change from `char *` to `void *` will not break builds due to implicit pointer conversion (SE-0324) and unchanged ABI.

Resolves rdar://83253511.
2021-12-22 02:58:21 -08:00
Hamish Knight
128f5d4bc6 Update regex literal lexing and emission
Update the lexing implementation to defer to the
regex library, which will pass back the pointer
from to resume lexing, and update the emission to
call the new `Regex(_regexString:version:)`
overload, that will accept the regex string with
delimiters.

Because this uses the library's lexing
implementation, the delimiters are now `'/.../'`
and `'|...|'` instead of plain `'...'`.
2021-12-17 18:05:31 +00:00
Richard Wei
300cbaba31 Integrate experimental string processing modules and enable end-to-end regex.
- Checkout apple/swift-experimental-string-processing using a tag.
- Build `_MatchingEngine` as part of libswift (`ExperimentalRegex`) using sources from the package.
- Parse regex literals using the parser from `_MatchingEngine`.
- Build both `_MatchingEngine` and `_StringProcessing` as part of core libs using sources from the package.
- Use `Regex<DynamicCaptures>` as the default regex type until we finalize apple/swift-experimental-string-processing#68.
2021-12-17 10:33:07 +00:00
Mishal Shah
b799e47724 Add support for Swift 5.6 branch 2021-12-07 19:04:23 -08:00
Mishal Shah
5fa7324618 Merge pull request #40381 from apple/tomerd-patch-1
update swift-system to 1.1.1
2021-12-06 09:51:09 -08:00
Richard Wei
5ca95ef291 Revert "[update-checkout] Clone experimental string processing package" 2021-12-02 16:55:48 -08:00
tomer doron
3c7e0bd10f update swift-system to 1.1.1 2021-12-02 14:32:37 -08:00