store icon indicating copy to clipboard operation
store copied to clipboard

❓[SUPPORT]: Compile for Ivy distribution

Open eddiepaz opened this issue 2 years ago • 5 comments

Are there any plans to support Ivy in the near future? When compiling:

Angular 13.1.3 @ngxs/store: 3.7.3

We get the message "Processing legacy "View Engine" libraries:

  • @ngxs/store/internals [es2015/esm2015] (git+https://github.com/ngxs/store.git)
  • @ngxs/store [es2015/esm2015] (git+https://github.com/ngxs/store.git)
  • @ngxs/devtools-plugin [es2015/esm2015] (git+https://github.com/ngxs/store.git) Encourage the library authors to publish an Ivy distribution.

Much appreciated!

eddiepaz avatar Jan 27 '22 13:01 eddiepaz

Yes, most definitely. I have actually been working closely with some of the Angular team members on a strategy to publish for both formats. I hope to include this approach just after the 3.8.0 release (potentially as 3.8.1). One of our goals is to support our large enterprise user base in this. It is unrealistic to expect all enterprises to move to the latest Angular as quickly as smaller projects (because enterprises have design systems etc.). So, at the moment, we are compiling in a way that we support Angular 7 all the way through to 13, but this requires NGCC.

markwhitfeld avatar Jan 28 '22 10:01 markwhitfeld

Any updates on this?

akialapiha avatar Jun 08 '22 13:06 akialapiha

Would like to see this moving as well. I think it is nice to support old Angular versions, but supporting ones, which are eol may be disputable. You can see the list of currently supported versions here and it states that v12 is the oldest supported version by the time posting this.

In addition to that, it might be a good sign for an intact framework to support current technologies. Especially, when new projects are in the process of framework selection, I would love to see ngxs in a more attractive position.

wiesnery avatar Jun 20 '22 17:06 wiesnery

Any updates on this please?

tfechtner avatar Sep 07 '22 09:09 tfechtner

This is still WIP, but very close to an RC release. I will post here first to get feedback on the RC 😉

markwhitfeld avatar Sep 08 '22 09:09 markwhitfeld

Hello :)

Any update?

Thanks for your work!!

kodze avatar Sep 28 '22 15:09 kodze

@markwhitfeld Hopefully ngxs has a release that is ivy, because I believe Angular15 would make this library unusable since they're removing support for libraries which aren't built for ivy.

I'm not sure if publishing both versions within the same major version makes much sense since 3.7.x has been the latest version for almost 2 years. It's nice goal, but seems almost unnecessary. If it's complicated to support both in the same version you can bump the major version and make it clear 4.x is the ivy build.

Sieabah avatar Oct 14 '22 04:10 Sieabah

Angular 15 is out now and if you are using the experimental esbuild the app is not running because of ngxs. Can we expect an update soon?

paulstelzer avatar Nov 18 '22 06:11 paulstelzer

We will be compiling for Ivy from the next release (v3.8). This is planned for next week.

On Fri, 18 Nov 2022 at 08:35, Paul Stelzer @.***> wrote:

Angular 15 is out now and if you are using the experimental esbuild the app is not running because of ngxs. Can we expect an update soon?

— Reply to this email directly, view it on GitHub https://github.com/ngxs/store/issues/1818#issuecomment-1319607309, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAO3U2K6N25QPDMAH5WU5JDWI4PUXANCNFSM5M54CEKA . You are receiving this because you were mentioned.Message ID: @.***>

markwhitfeld avatar Nov 18 '22 13:11 markwhitfeld

is this still planned for this week? the majority of my stuff seems to be working inside angular 15 but well want to be sure, thanks for the great job.

luishcastroc avatar Nov 23 '22 15:11 luishcastroc

The PR is in progress, so we will see how it goes ;-)

On Wed, 23 Nov 2022 at 17:08, Luis Castro @.***> wrote:

is this still planned for this week? the majority of my stuff seems to be working inside angular 15 but well want to be sure, thanks for the great job.

— Reply to this email directly, view it on GitHub https://github.com/ngxs/store/issues/1818#issuecomment-1325223821, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAO3U2K4DGBIBC6QUH4FFYLWJYXOXANCNFSM5M54CEKA . You are receiving this because you were mentioned.Message ID: @.***>

markwhitfeld avatar Nov 24 '22 11:11 markwhitfeld

3.7.5 seemed to be building ES2020. I see 3.7.6 just dropped but it is building ES2015.

⠙ Generating browser application bundles (phase: setup)...Processing legacy "View Engine" libraries:
- @ngxs/store/internals [es2015/esm2015] (git+https://github.com/ngxs/store.git)
- @ngxs/store [es2015/esm2015] (git+https://github.com/ngxs/store.git)
- @ngxs/store/operators [es2015/esm2015] (git+https://github.com/ngxs/store.git)
- @ngxs/router-plugin [es2015/esm2015] (git+https://github.com/ngxs/store.git)
- @ngxs/storage-plugin [es2015/esm2015] (git+https://github.com/ngxs/store.git)
- @ngxs/devtools-plugin [es2015/esm2015] (git+https://github.com/ngxs/store.git)

BenRacicot avatar Dec 07 '22 00:12 BenRacicot

3.7.5 seemed to be building ES2020. I see 3.7.6 just dropped but it is building ES2015.

⠙ Generating browser application bundles (phase: setup)...Processing legacy "View Engine" libraries:
- @ngxs/store/internals [es2015/esm2015] (git+https://github.com/ngxs/store.git)
- @ngxs/store [es2015/esm2015] (git+https://github.com/ngxs/store.git)
- @ngxs/store/operators [es2015/esm2015] (git+https://github.com/ngxs/store.git)
- @ngxs/router-plugin [es2015/esm2015] (git+https://github.com/ngxs/store.git)
- @ngxs/storage-plugin [es2015/esm2015] (git+https://github.com/ngxs/store.git)
- @ngxs/devtools-plugin [es2015/esm2015] (git+https://github.com/ngxs/store.git)

yeah the PR is not merged yet so that's not the one

luishcastroc avatar Dec 07 '22 00:12 luishcastroc

We've merged the commit that switched to partial compilation format and doesn't require ngcc. It's available under 3.7.6-dev.master-dcdd391. The package is built using Angular 12 since it's the initial version supporting Angular package format and it's compatible with all of the next versions. You can install it and test it out:

$ npm install @ngxs/[email protected]

We're planning this to be available in 3.8.0 version.

arturovt avatar Dec 11 '22 20:12 arturovt

We've merged the commit that switched to partial compilation format and doesn't require ngcc. It's available under 3.7.6-dev.master-dcdd391. The package is built using Angular 12 since it's the initial version supporting Angular package format and it's compatible with all of the next versions. You can install it and test it out:

$ npm install @ngxs/[email protected]

We're planning this to be available in 3.8.0 version.

thanks for the hard work, are there dev.master versions as well for the router and other plugins?

luishcastroc avatar Dec 11 '22 23:12 luishcastroc

Yes, they are published with the same version.

arturovt avatar Dec 12 '22 05:12 arturovt

We've merged the commit that switched to partial compilation format and doesn't require ngcc. It's available under 3.7.6-dev.master-dcdd391. The package is built using Angular 12 since it's the initial version supporting Angular package format and it's compatible with all of the next versions. You can install it and test it out:

$ npm install @ngxs/[email protected]

We're planning this to be available in 3.8.0 version.

Can I ask if some volunteers from this channel could attempt an upgrade in their codebases and give feedback on the result? We would like to cut the 3.8.0 release soon, and this feedback would be very valuable. Testing out the latest dev version would be the best:

npm install @ngxs/store@dev

You would need to do the same for any ngxs plugins that you use (see here: https://www.ngxs.io/getting-started/installation#development-builds)

markwhitfeld avatar Dec 14 '22 19:12 markwhitfeld

I Can give it a try, what kind of testing are you looking for?

luishcastroc avatar Dec 14 '22 19:12 luishcastroc

Thanks @luishcastroc. I would say something like the following: Install the new version, build your app, run your tests, any other kind of sanity checks that you may usually do. In the upgrade you may need to fix some types if you use state operators, because the type checking and inference have been improved. If you need to do these type fixes, it would be great if you could describe the change you had to make 🙏.

markwhitfeld avatar Dec 14 '22 19:12 markwhitfeld

I can give this a shot later tonight

Sieabah avatar Dec 14 '22 19:12 Sieabah

I've just ran a test with this version and everything seems to be working well. Only using devtools in terms of plugins though so can't comment on the other plugins.

me4502 avatar Dec 14 '22 23:12 me4502

Building within node:16 docker container, angular 14 (been holding off on angular 15 until this was released)

"@ngxs/router-plugin": "^3.7.6-dev.master-5f9405c",
"@ngxs/store": "^3.7.6-dev.master-5f9405c",
"@ngxs/devtools-plugin": "^3.7.6-dev.master-5f9405c",

I upgraded my project to angular 15 with the same versions listed above and also ran into no issues

Sieabah avatar Dec 15 '22 05:12 Sieabah

Also updated my project (using store, devtools and storage) and everything is working like before. Great job und esbuild is working now too. I have no problems with typings, so I had made no changes

paulstelzer avatar Dec 15 '22 06:12 paulstelzer

Hello!

Same here, no issues with the version! (node:14 + angular 14)

kodze avatar Dec 15 '22 09:12 kodze

haven't seen issues with my angular 15 standalone application

luishcastroc avatar Dec 15 '22 12:12 luishcastroc

Same to me. No issues with angular 15 application.

msalzig avatar Dec 17 '22 06:12 msalzig

Any timeline for the 3.8 to be released?

luishcastroc avatar Jan 09 '23 02:01 luishcastroc

My project uses angular 14 node 14 and it works like a charm if I use this specific version 3.7.6-dev.master-dcdd391 if I use current version on dev then the code still work but it builds in ViewEngine instead of ivy.

ice-blaze avatar Feb 06 '23 17:02 ice-blaze

Any timeline for the 3.8 to be released?

Just reading that next major angular will completely remove NGCC so more than ever to keep up we need this one :)

luishcastroc avatar Feb 15 '23 20:02 luishcastroc

@markwhitfeld a big number of people use your library (because it rocks), any plan the next version? Kinda afraid of being unable to update to Angular 16.

renatoaraujoc avatar Feb 18 '23 09:02 renatoaraujoc