-
Notifications
You must be signed in to change notification settings - Fork 60
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
Provide an Ivy distribution #255
Comments
Thanks for reporting this. I will have a look into this, in the mean time if this is blocking for you I am happy to review a PR. |
Thank you. No, currently it's not blocking, it would become blocking when Angular 14 gets released and people migrate to it. |
We looked at this internally and believe it is definitely an improvement to be providing an Ivy Distribution. The above means we will need to patch this in a major version, which we feel like we want to use to introduce a few other breaking changes as well and plan it for later this year. It also looks like our SDK still works with Angular 14 beta, however as soon as it turns out our SDK is not compatible with the latest version of Angular we will definitely put a fix out as soon as possible. |
I am looking forward to it! The first RC for Angular 14 is out. What's the progress on version 2.0? |
Curious why you are looking forward to it? Anything you are missing in the current format that doesn't allow you to achieve what u want? There is no time frame on 2.0 currently, no. |
I was hoping for an easy way to write to Furthermore I am just looking forward to using Angular v14. There is some good stuff coming. But it looks like the RC is Ivy only. So without the update to an Ivy distribution Auth0 would hold me back from using some incredible features. |
Thanks for that info @MedLeon . Our intention is definitely not to block anyone. I will look into the RC and try and identify what it means for non-Ivy Distributions. |
@MedLeon , I installed our SDK in an Angular application that's using Would you have some more information about this?
|
Building View Engine libraries makes to build process longer than it has to imo.
Just make Ivy 2.0 and next breaking changes 3.0 - doesn't cost you anything. This is what other angular libraries have done for Ivy support. See my comment here: |
Let's see what's going to happen when the final 14.0.0 release comes out. Maybe they will drop the View Engine support last, who knows? |
Here is the guide from Angular team with settings you must use https://angular.io/guide/creating-libraries#publishing-libraries |
I'm also thinking that test don't work fine if the library is not Ivy compatible. I could look into how to make Jest compile this module "the old way", but I don't want to. Please, make a new major version that is Ivy compatible so we can all go on with our lives. |
Here you can see how @sentry solved this issue - they provides both version getsentry/sentry-javascript#4641 |
I don't think they solved it. It looks like they will provide an Ivy distribution with a major version bump. |
Nope, we didn't solve full Ivy compatibility yet. Basically we're struggling with the same support of older Angular versions problem. Will revisit this for the next major release, as promised ;) |
Don't want to sound mean, but I think I will.
What you are struggling with is the version numbering you are currently using doesn't fit what Angular is doing. If you look around at Angular 1st and 3rd party libraries, a lot of them have different major versions for different Angular versions. So it's not that you can't support multiple Angular versions - it's that you don't want to "mess up the nice version numbers" to support multiple Angular versions. Both Auth0 and Sentry are paid products - you could show a bit of love for the customer here. |
Angular 14 is out and I'm trying to integrate the library and it's failing due to lack of Ivy support. Any idea when support is coming for Ivy? |
I can't seem to complete the tutorials from the Auth0 team due to the Ivy problem. /// Visual Studio Code, editor error message @param config — The optional configuration for the SDK. 'AuthModule' does not appear to be an NgModule class.(-996002) |
Angular 13,
|
I just hit the same message as @VRMink posted in my Angular 11 app.
"@angular-devkit/core": "v11-lts",
"@angular/animations": "v11-lts",
"@angular/cdk": "v11-lts",
"@angular/common": "v11-lts",
"@angular/compiler": "v11-lts",
"@angular/core": "v11-lts",
"@angular/forms": "v11-lts",
"@angular/localize": "v11-lts",
"@angular/platform-browser": "v11-lts",
"@angular/platform-browser-dynamic": "v11-lts",
"@angular/router": "v11-lts",
...
"@auth0/auth0-angular": "^1.10.1",
Are there any current solutions for this or are we stuck for now? |
@thesuavehog and @VRMink This looks like a different problem. Our SDK has worked fine with Angular 11 and 13 before, apart from the console output being discussed in this thread. I just gave it another try, and I am not getting the above error in a new Angular 11 and 13 project, Could you please open another issue so we can look into what's going on there? |
@frederikprijck The issue I noted went away for me after some combination of re-compiling, reloading/restarting VS Code. Sorry for the confusion. |
@frederikprijck I am facing an error with Yarn PnP enabled. So to show you I copied your playground, converted code alittle bit and switched to Yarn PnP. You can check my repro & steps here https://github.com/Lonli-Lokli/auth0-pnp
|
@Lonli-Lokli I am not familiar with Yarn PhP, but the error looks to be the same as others have run into, which went away randomly. Not sure I understand correctly but are u insisting providing an Ivy distibution would fix this? If that would not be the case, please open another issue so we can look into what it takes to support Yarn PnP, but be aware we have no explicit support for that and, as you may be well aware as you are involved, Yarn PnP does have some issues with the Angular CLI: angular/angular-cli#16980 |
@frederikprijck yarn PnP is a mode when you do not have node_modules but have readonly tarballs, which can be consumed by webpack5 during the build. ViewEngine requires ngcc to run, which must mutate packages with it. Ivy partial format is a special partially compiled libraries which do not require ngcc layer because can be consumed directly. |
Thanks, that makes sense. Would you be able to verify if #324 would solve it for Yarn PnP as well? That should use partial compilation mode.
Then install using the tarball generated inside |
@frederikprijck Yes, it compiles & run without errors, I pushed code to same repo with changes. |
Sorry for this to take so long, but this has shown to be more complicated as I think it should be. I had a conversation with the Angular team and concluded the following: When you compile an SDK with Angular 14 and compilationMode set to partial, the SDK will only work with Angular 14+.
Given we have no specific features from angular apart from a service and an interceptor, I believe we should be fine to stick with Angular 12, that would have full support for Angular 12, 13, 14 and 15. However, that would mean we can not merge the PR that bumps Angular to 14 yet, but can only do so once Angular has dropped support for Angular 12 and 13. Maintaining multiple versions comes with a cost that is not worth it for our SDK. Long story short, I have created a PR to get rid of this warning, can you please have a look and let me know if it would do for those in this tread? #345 |
After migrating to Angular 13, now I get this message when building:
I think it's related to the fact that Angular are deprecating the View Engine in favour of Ivy which means in Angular v14 the library won't be able to build any more if this change is not being addressed.
The text was updated successfully, but these errors were encountered: