forked from com-lihaoyi/requests-scala
-
Notifications
You must be signed in to change notification settings - Fork 0
Check how upstream master differs from initial fork branch #2
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix com-lihaoyi#132 Start a local httpbin container to run tests against. Https requests are still using remote one since it's hard to setup local secure ssl. The requests using https are simple and during my tests I haven't seen any timeout.
…-lihaoyi#178) Hi, Haoyi, This PR will be part of my work to introduce native supports to `requests-scala` [com-lihaoyi#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 <[email protected]> Co-authored-by: Ondra Pelech <[email protected]>
Nothing changes besides codes been formatted. I copied `.scalafmt` from mill and did very little tunings for consistency and readability. My local test results ```sh $ ./mill -i __.publishArtifacts + __.test [418/420] requests[2.13.15].test.test [418] [420/420] requests[3.3.4].test.test [420] [417/420] requests[2.12.20].test.test [417] [420/420] ==================================================================== __.publishArtifacts + __.test ======================================================================= 1s ``` My local binary compatibility check results ``` $ ./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 [211/212] requests.jvm[2.12.20].mimaReportBinaryIssues [210/212] requests.jvm[2.13.15].mimaReportBinaryIssues [212/212] requests.jvm[3.3.4].mimaReportBinaryIssues [211] Scanning binary compatibility in /home/lqhuang/Git/requests-scala/out/requests/jvm/2.12.20/compile.dest/classes ... [210] Scanning binary compatibility in /home/lqhuang/Git/requests-scala/out/requests/jvm/2.13.15/compile.dest/classes ... [212] Scanning binary compatibility in /home/lqhuang/Git/requests-scala/out/requests/jvm/3.3.4/compile.dest/classes ... [210] Binary compatibility check passed [211] Binary compatibility check passed [212] Binary compatibility check passed [212/212] ============================== __.mimaReportBinaryIssues ============================== 8s ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.