Commit 6f566e6
chore: Upgrade build deps to ensure compatible with Scala Native (#178)
Hi, Haoyi,
This PR will be part of my work to introduce native supports to
`requests-scala` [#156].
I try to update current build dependencies to make sure that current
tool chains are compatible with Scala Native and current implementations
before introducing other breaking changes.
Here are some notable changes:
1. Scala 2.11 must be deprecated because `geny` has deprecated Scala
2.11 since 1.1.0
2. Add Java 21 LTS to GitHub CI for testing job
3. All test cases passed in my local env.
4. But mima binary checks failed. I'm not very sure if it's fine or not.
More details attached here
Local testing results after changes
```console
$ ./mill -i __.publishArtifacts + __.test
[build.mill-57/61] compile
[build.mill-57] [info] compiling 1 Scala source to /home/lqhuang/Git/requests-scala/out/mill-build/compile.dest/classes ...
[build.mill-57] [info] done compiling
[418/420] requests[2.13.15].test.test
[418]
[416/420] requests[3.6.2].test.test
[416]
[420/420] requests[2.12.20].test.test
[420]
[420/420] =============================================================== __.publishArtifacts + __.test ================================================================== 6s
```
report binary issues
```console
$ ./mill -i __.mimaReportBinaryIssues
[183/185] requests[2.13.15].mimaReportBinaryIssues
[184/185] requests[2.12.20].mimaReportBinaryIssues
...
[183] Found 52 issue when checking against com.lihaoyi:requests:0.7.0
[184] Found 52 issue when checking against com.lihaoyi:requests:0.7.0
...
[185/185] ================================================================= __.mimaReportBinaryIssues ==================================================================== 2s
3 tasks failed
requests[2.12.20].mimaReportBinaryIssues Failed binary compatibility check! Found 206 potential problems
requests[2.13.15].mimaReportBinaryIssues Failed binary compatibility check! Found 206 potential problems
requests[3.6.2].resolvedMimaPreviousArtifacts scala.MatchError: Failure(
Resolution failed for 1 modules:
--------------------------------------------
com.lihaoyi:requests_3:0.6.7
not found: /home/lqhuang/.ivy2/local/com.lihaoyi/requests_3/0.6.7/ivys/ivy.xml
not found: https://repo1.maven.org/maven2/com/lihaoyi/requests_3/0.6.7/requests_3-0.6.7.pom
--------------------------------------------
```
Any feedback and suggestion is appreciated!
Regards,
Lanqing
----
Updates:
After refactoring `build.mill`, now binary check passed in my local env,
too.
```
$ ./mill clean && ./mill -i __.mimaReportBinaryIssues
[build.mill-64/68] compile
[build.mill-64] [info] compiling 1 Scala source to /home/lqhuang/Git/requests-scala/out/mill-build/compile.dest/classes ...
[build.mill-64] [info] done compiling
[1/1] clean
[1/1] ============================== clean ==============================
[197/212] mill.scalalib.ZincWorkerModule.worker
[197] Compiling compiler interface...
[200/212] requests.jvm[3.3.4].compile
[199/212] requests.jvm[2.13.15].compile
[199] [info] compiling 7 Scala sources to /home/lqhuang/Git/requests-scala/out/requests/jvm/2.13.15/compile.dest/classes ...
[200] [info] compiling 7 Scala sources to /home/lqhuang/Git/requests-scala/out/requests/jvm/3.3.4/compile.dest/classes ...
[199] [warn] 4 deprecations (since 0.9.0)
[199] [warn] 4 deprecations (since 2.13.0)
[199] [warn] 8 deprecations in total; re-run with -deprecation for details
[199] [warn] 3 feature warnings; re-run with -feature for details
[199] [warn] four warnings found
[199] [info] done compiling
[200] [warn] there were 3 feature warnings; re-run with -feature for details
[200] [warn] there were 6 deprecation warnings; re-run with -deprecation for details
[200] [warn] two warnings found
[200] [info] done compiling
[204/212] requests.jvm[2.13.15].mimaReportBinaryIssues
[208/212] requests.jvm[3.3.4].mimaReportBinaryIssues
[204] Scanning binary compatibility in /home/lqhuang/Git/requests-scala/out/requests/jvm/2.13.15/compile.dest/classes ...
[208] Scanning binary compatibility in /home/lqhuang/Git/requests-scala/out/requests/jvm/3.3.4/compile.dest/classes ...
[204] Binary compatibility check passed
[198/212] requests.jvm[2.12.20].compile
[198] [info] compiling 7 Scala sources to /home/lqhuang/Git/requests-scala/out/requests/jvm/2.12.20/compile.dest/classes ...
[208] Binary compatibility check passed
[198] [warn] 6 deprecations (since 0.9.0); re-run with -deprecation for details
[198] [warn] three feature warnings; re-run with -feature for details
[198] [warn] two warnings found
[198] [info] done compiling
[212/212] requests.jvm[2.12.20].mimaReportBinaryIssues
[212] Scanning binary compatibility in /home/lqhuang/Git/requests-scala/out/requests/jvm/2.12.20/compile.dest/classes ...
[212] Binary compatibility check passed
[212/212] ============================== __.mimaReportBinaryIssues ============================== 13s
```
And now if you access `https://self-signed.badssl.com/`, it literally
returns a "404 Not Found". Moreover, it looks like the whole site
`badssl.com` returns `404` (???? Shutdown or server error?)
I update corresponding unit tests.
```console
$ curl --insecure -vvv https://self-signed.badssl.com/
* Uses proxy env variable no_proxy == '.local,.internal,.arpa,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16'
* Host self-signed.badssl.com:443 was resolved.
* IPv6: (none)
* IPv4: 104.154.89.105
* Trying 104.154.89.105:443...
* Connected to self-signed.badssl.com (104.154.89.105) port 443
* ALPN: curl offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 / prime256v1 / rsaEncryption
* ALPN: server accepted http/1.1
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=BadSSL; CN=*.badssl.com
* start date: Dec 19 21:03:33 2024 GMT
* expire date: Dec 19 21:03:33 2026 GMT
* issuer: C=US; ST=California; L=San Francisco; O=BadSSL; CN=*.badssl.com
* SSL certificate verify result: self-signed certificate (18), continuing anyway.
* Certificate level 0: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
* using HTTP/1.x
> GET / HTTP/1.1
> Host: self-signed.badssl.com
> User-Agent: curl/8.5.0
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Server: nginx/1.10.3 (Ubuntu)
< Date: Tue, 07 Jan 2025 10:41:04 GMT
< Content-Type: text/html
< Content-Length: 178
< Connection: keep-alive
<
<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.10.3 (Ubuntu)</center>
</body>
</html>
* Connection #0 to host self-signed.badssl.com left intact
```
Current notable changes:
1. Scala 2.11 must be deprecated because `geny` has deprecated Scala
2.11 since 1.1.0
2. `Option.when(VcsVersion.vcsState().commitsSinceLastTag !=
0)(VcsVersion.vcsState().lastTag).flatten` only appends `0.6.7`, so I
replaced it with concrete release versions.
3. Add Java 21 LTS to GitHub CI for testing job
4. Add Scala 3.6.2 to GitHub CI to run testing job for Scala Next
5. test cases passed in my local env.
6. binary check passed in my local env
---------
Co-authored-by: Li Haoyi <haoyi.sg@gmail.com>
Co-authored-by: Ondra Pelech <ondra.pelech@gmail.com>1 parent d71f35d commit 6f566e6
File tree
4 files changed
+69
-37
lines changed- .github/workflows
- requests/test/src/requests
4 files changed
+69
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
12 | 18 | | |
13 | 19 | | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
17 | 23 | | |
18 | | - | |
| 24 | + | |
19 | 25 | | |
20 | | - | |
21 | | - | |
| 26 | + | |
| 27 | + | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
26 | | - | |
| 32 | + | |
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
31 | | - | |
| 37 | + | |
32 | 38 | | |
33 | 39 | | |
34 | | - | |
| 40 | + | |
35 | 41 | | |
36 | 42 | | |
37 | | - | |
| 43 | + | |
38 | 44 | | |
39 | | - | |
| 45 | + | |
40 | 46 | | |
41 | 47 | | |
42 | 48 | | |
| |||
47 | 53 | | |
48 | 54 | | |
49 | 55 | | |
50 | | - | |
51 | | - | |
52 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
53 | 59 | | |
54 | | - | |
55 | | - | |
| 60 | + | |
| 61 | + | |
56 | 62 | | |
57 | 63 | | |
58 | 64 | | |
| |||
73 | 79 | | |
74 | 80 | | |
75 | 81 | | |
| 82 | + | |
76 | 83 | | |
77 | 84 | | |
78 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
| 4 | + | |
3 | 5 | | |
4 | | - | |
5 | | - | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
11 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | | - | |
| 17 | + | |
| 18 | + | |
14 | 19 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | 20 | | |
24 | 21 | | |
25 | | - | |
| 22 | + | |
26 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| |||
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
35 | | - | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
39 | | - | |
| 42 | + | |
| 43 | + | |
40 | 44 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
47 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
48 | 73 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
| 274 | + | |
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| |||
0 commit comments