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

Remove URL stubs for 0.5.0 #2788

Merged
merged 2 commits into from Oct 17, 2022
Merged

Conversation

ekrich
Copy link
Member

@ekrich ekrich commented Aug 16, 2022

This PR removes java.net.URL and friends and also java.net.URI.toURL. It is important to do these removals as soon as possible in these breaking releases to give downstream application a chance to adapt. Also, removing them now with no deprecation cycle is better to avoid future people from relying on the code while we have less adoption and more motivated adopters.

URL stubs were added to support https://github.com/ekrich/sconfig which is an important dependency for a Scala Native version of scalafmt. Other libraries may have been relying on them too.

Because URL is basically a full HTTP client library, it is non-trivial to implement. It is not implemented in Scala.js because it is not possible due to concurrent DNS lookups and Scala Native also supports a single threaded runtime, so we should not add it to the base system.

A release file was added using the last major release as a template. This was needed to capture the details.

@ekrich
Copy link
Member Author

ekrich commented Aug 16, 2022

@WojciechMazur This is ready for review.

@LeeTibbert
Copy link
Contributor

Eric, what offering did you give to multiarch builds?
They are all green for you and have been failing
for me for months.

You must be leading a more virtuous life than I and
the Universe/Multiverse is rewarding it.

@LeeTibbert
Copy link
Contributor

The changelog herein is a much better starting point. Thanks Eric.
After this PR is merged, I will rebase PR #2783 on this.

Do you have thoughts of where you would like to see a "Deprecations" section?
You seem to have a rhythm here and I do not want to disrupt it.

@ekrich
Copy link
Member Author

ekrich commented Aug 19, 2022

I just copied the 0.4.0 file because it was the last major release with lots of changes. We should maybe put removed deprecations in the breaking section and if we have new ones then maybe a new deprecation section.

@LeeTibbert
Copy link
Contributor

re: removed & new deprecation items. Sounds good to me.

Do you want to drop in those headers where you think they should go so that they
are in a reasonable place when the first person comes along with deprecation items?
I am not trying to slough off work. Unity of design, especially at the beginning, comes
through to the reader. I am suggesting a "low stress" edit, they can always be
moved or rearranged.

A thought.

@LeeTibbert
Copy link
Contributor

It is not said often enough or by enough people, but thank you for your housekeeping and supervision
work, such as this.

@WojciechMazur
Copy link
Contributor

I've created a repo with to-be-removed methods, can to you take a look does it contain all removed interfaces? Also, I've seen that probably some of the URI or URL-related classes might be not removed, was that expected?
https://github.com/scala-native/scala-native-java-stubs is currently a private repo with limited access until the release 0.5.0. I didn't want to leave it public, as it might be confusing until its first release.

@ekrich
Copy link
Member Author

ekrich commented Aug 30, 2022

URLEncoder and URLDecoder are not just stubs and one of them is also in Scala.js. The others I removed are only stubs - they were added just to make sconfig work. Since then we have recommended adding stubs to the projects that need them if the implementations are not going to be added to Scala Native.

I think the original intent was to have a place for the security code but that is more tangled than expected so far.

@ekrich
Copy link
Member Author

ekrich commented Sep 22, 2022

@WojciechMazur This is ready for review. Might go first as it adds the 0.5.0 release notes that we can add to in subsequent PRs.

@WojciechMazur WojciechMazur merged commit b37b28c into scala-native:main Oct 17, 2022
@ekrich ekrich deleted the topic/url-stubs branch October 19, 2022 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants