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

AngularDart 8 Roadmap #6

Open
5 of 17 tasks
GZGavinZhao opened this issue May 20, 2022 · 23 comments
Open
5 of 17 tasks

AngularDart 8 Roadmap #6

GZGavinZhao opened this issue May 20, 2022 · 23 comments

Comments

@GZGavinZhao
Copy link

GZGavinZhao commented May 20, 2022

This is an incomplete list that I can think of on the top of my head, and I'll come back here to add more things. Feel free to suggest anything more!

For now, I don't expect there to be breaking changes in existing codebases that are using null safety.

@ykmnkmi
Copy link

ykmnkmi commented Jun 6, 2022

Old pipes and animations in Component?

@ykmnkmi
Copy link

ykmnkmi commented Sep 7, 2022

Can we also deprecate and remove ReflectiveInjector, bootstrapStatic, runAppLegacy and runAppLegacyAsync? How it would look.

@GZGavinZhao
Copy link
Author

@ykmnkmi I'm okay with that. Feel free to send in a PR!

@insinfo
Copy link

insinfo commented Sep 21, 2022

@GZGavinZhao
Congratulations for your dedication to this project, I would particularly like to be contributing to this project but I haven't had the time. I deal with AngularDart projects on a day to day basis, but at the company where I work we still have a lot of projects stuck in AngularDart 6 and dart 2.12. I really appreciate the idea of not being stuck with AngularDart Components (MaterialDesign), I use a lot of custom components that make use of CSS Bootstrap.

@ykmnkmi
Copy link

ykmnkmi commented Nov 18, 2022

@GZGavinZhao looking at the "Fix all static analysis warnings" and "constant_identifier_names" rule (152 cases), can I deprecate public members with names like this "OnPush" and replace them with new ones?

@GZGavinZhao
Copy link
Author

@ykmnkmi No problem, go for it :)

@ykmnkmi
Copy link

ykmnkmi commented Jun 29, 2023

@GZGavinZhao I thinks analyzer warnings task is done.
What you think about migrating all packages and tests to Dart 3 and analyzer 6?

@GZGavinZhao
Copy link
Author

GZGavinZhao commented Jun 30, 2023

@GZGavinZhao I thinks analyzer warnings task is done. What you think about migrating all packages and tests to Dart 3 and analyzer 6?

@ykmnkmi Good idea! The only caution I would have is that if we migrate to Dart 3, we either have to remove non-null-safe support entirely, or find a way to disable/isolate it during testing. In my opinion, the 2nd option is more desirable, but I'm not sure how difficult it would be. If the 2nd option is not possible, then we will likely have to remove non-null-safety support from AngularDart.

Side note, Angular's runtime code is already theoretically compatible with Dart 3 as indicated by the Pub packages page and it seems that @jodinathan was able to get it working as well; the only potential blocker here is the Angular Compiler, as explained in the previous paragraph.

@ykmnkmi
Copy link

ykmnkmi commented Aug 15, 2023

Currently, I'm bumping all package versions to the minimal version that has migrated to Dart 3.0 or the latest pre-3.0 version and fixing errors and analysis warnings.

For example:

# ngtest/pubspec.yaml
dependencies:
  collection: ^1.17.2
  # ...

dev_dependencies:
  build_runner: ^2.4.6
  build_test: ^2.2.0
  build_web_compilers: ^4.0.4
  test: ^1.24.4
  # ...

One package that is holding up migration is mockito, as I am waiting for it to update. It's a dev dependency in ngforms, ngrouter, and _tests.

@insinfo
Copy link

insinfo commented Aug 17, 2023

@ykmnkmi @GZGavinZhao

Is it possible to keep AngularDart 8 compatible with dart 2.18, 2.19 and 3?
I'm asking this because many of my projects are stuck on dart 2.18.x at the moment

@ykmnkmi
Copy link

ykmnkmi commented Aug 17, 2023

@insinfo I think it would be better to backporting updates to v7.x branch, keeping it with Dart 2.x and analyzer 5.x build stack.

@insinfo
Copy link

insinfo commented Nov 14, 2023

@ykmnkmi
I'm working on bringing some of the projects to dart 3.1.5, due to a bug I found in dart 2.18.* but from what I've seen, ngdart 8.0.0-dev.0 still doesn't work with dart 3, right? What package prevents AngularDart from working with Dart 3?

@ykmnkmi
Copy link

ykmnkmi commented Nov 15, 2023

@insinfo dart-lang/mockito#706 and tests in _tests, ngforms and ngrouter.

@insinfo
Copy link

insinfo commented Nov 22, 2023

I forked ngdart here to try to make it work on dart 3.1.5, made some dependency changes, set it to sdk: '>=3.0.0 <4.0.0', and made modifications to the mixins classes and it seems to be working well on dart 3.1.5 in a large project. I have no knowledge of the structure of the angular project, I don't know what the "goldens" package and the "_tests" package are, I ran the "ngast" and "ngcompiler" package tests and it passed all the tests

https://github.com/insinfo/angular_8
https://www.youtube.com/watch?v=LruIQZ77GIw

@insinfo
Copy link

insinfo commented Nov 22, 2023

the "ngforms", "ngrouter", "ngast" and "ngcompiler" package could be integrated with the "ngdart" package to reduce dependencies on many packages and facilitate maintenance in just one package

@GZGavinZhao
Copy link
Author

@insinfo @ykmnkmi and I have been working on #68, where functionality wise it is working (browser tests all passed) but we're still fixing tests (compiler tests in _tests were failing because of null-safety issues).

@insinfo
Copy link

insinfo commented Nov 27, 2023

the "ngforms", "ngrouter", "ngast" and "ngcompiler" package could be integrated with the "ngdart" package to reduce dependencies on many packages and facilitate maintenance in just one package

I did a proof of concept here, I modified the ngdart package to include the ngast, ngcompiler, ngforms, ngrouter and ngtest packages. And I used it on the project I'm working on and it seems to be working well. now my project depends on just one package

image
https://github.com/insinfo/angular_8
image

@ykmnkmi
Copy link

ykmnkmi commented Dec 7, 2023

@insinfo, I also think about it. As for goldens, I use goldens to view changes in generated JS in the process of changing AngularDart internals.

@dukefirehawk
Copy link

For those that would like to run ngdart with dart 3.2, I use the following pubspec.yml in my project without any issues. Granted I don't use ngcomponents. Instead use Bulma with ngdart. Light weight and works seamlessly.

name: myportal
version: 1.0.0
description: An ngdart web portal
publish_to: none
environment:
  sdk: ">=3.0.0 <4.0.0"
dependencies:
  ngdart: ^8.0.0-dev.2
  ngrouter: ^4.0.0-dev.1
  ngforms: ^5.0.0-dev.1
  crypto: ^3.0.1
dev_dependencies:
  ngtest: ^5.0.0-dev.0
  build_runner: ^2.1.2
  build_test: ^2.1.3
  build_web_compilers: ^4.0.0
  test: ^1.16.5
  sass_builder: ^2.1.3
  webdev: ^3.0.0
  lints: ^3.0.0
dependency_overrides:
  build_modules: ^5.0.0

@insinfo
Copy link

insinfo commented Jan 31, 2024

@duquefirehawk

If you overwrite only the build_modules package, a warning message will appear, so that this message does not appear, you must also overwrite the analyzer package

[WARNING] ngdart on web/main.dart: Your current `analyzer` version may not fully support your current SDK version.

Analyzer language version: 3.1.0
SDK language version: 3.2.0

Please update to the latest `analyzer` version (6.4.1) by running
`dart pub upgrade`.

If you are not getting the latest version by running the above command, you
can try adding a constraint like the following to your pubspec to start
diagnosing why you can't get the latest version:

dev_dependencies:
  analyzer: ^6.4.1
environment:
  sdk: ^3.2.1

dependencies:
  ngdart: ^8.0.0-dev.2
  ngrouter: ^4.0.0-dev.1
  ngforms: ^5.0.0-dev.1 

dev_dependencies:  
  build_runner: ^2.1.2
  build_test: ^2.1.3
  build_web_compilers: ^4.0.0
  lints: ^2.1.0
  test: ^1.24.0

dependency_overrides:
  build_modules: ^5.0.0
  analyzer: ^6.4.1

@GZGavinZhao
Copy link
Author

Oh well I guess it's time for a pre-release for Dart 3. I will publish one this weekend.

@dukefirehawk
Copy link

Maybe a pre-release for ngcomponents too while you are at it :)

@GZGavinZhao
Copy link
Author

GZGavinZhao commented Feb 5, 2024

Dart 3 pre-release has been published, version are as follows:

dependencies:
  ngdart: 8.0.0-dev.4
  ngrouter: 4.0.0-dev.3
  ngforms: 5.0.0-dev.3

dev_dependencies:
  ngtest: 5.0.0-dev.3

# internal packages
others:
  ngast: 3.0.0-dev.2
  ngcompiler: 3.0.0-dev.3

Will publish a pre-release ngcomponents shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants