Skip to content

consider refactoring giant 'uri.dart' #37152

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

Open
zichangg opened this issue Jun 3, 2019 · 3 comments
Open

consider refactoring giant 'uri.dart' #37152

zichangg opened this issue Jun 3, 2019 · 3 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-core type-code-health Internal changes to our tools and workflows to make them cleaner, simpler, or more maintainable type-enhancement A request for a change that isn't a bug

Comments

@zichangg
Copy link
Contributor

zichangg commented Jun 3, 2019

Uri.dart has become a huge file for dart:core. I tried to add user-specific feature onto Class uri, which could be a burden for all the other users. Would it be better to extract most class uri into a single package?

@zichangg zichangg added the area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. label Jun 3, 2019
@zichangg zichangg self-assigned this Jun 3, 2019
@zichangg
Copy link
Contributor Author

zichangg commented Jun 3, 2019

@kevmoo @lrhn @a-siva

@lrhn
Copy link
Member

lrhn commented Jun 4, 2019

See also #29420

This was one thing we had hoped to do for Dart 2.0, but did not have the resources for.
We wanted to move a lot of functionality out of the Uri class, and make it closer in behavior with the JavaScript URL class (to enable web compilation to use that class as an implementation).
It would remove much of the normalization functionality, which could then be provided by a package instead.
Alas, migrating to strong mode was hard enough without adding extra breakage.

Changing anything about how the Uri class works is a breaking change. It is widely used, and while most uses can probably survive with a core functionality, there are definitely some uses which depends on the full normalization that the class supplies.

Maybe for Dart 3.0.

@lrhn lrhn added area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-core and removed area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. labels Jun 4, 2019
@zichangg
Copy link
Contributor Author

Summarized from discussion in my CL and put it here as a potential request.
Consider providing fields for raw URI parts, current implementation will only contains normalized version.

@a-siva a-siva added the type-code-health Internal changes to our tools and workflows to make them cleaner, simpler, or more maintainable label Jul 22, 2019
@zichangg zichangg removed their assignment Feb 13, 2020
@lrhn lrhn added the type-enhancement A request for a change that isn't a bug label Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-core type-code-health Internal changes to our tools and workflows to make them cleaner, simpler, or more maintainable type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants