Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

"Encourage the library authors to publish an Ivy distribution." #251

Open
EnricoVogt opened this issue Nov 24, 2021 · 8 comments
Open

"Encourage the library authors to publish an Ivy distribution." #251

EnricoVogt opened this issue Nov 24, 2021 · 8 comments

Comments

@EnricoVogt
Copy link

EnricoVogt commented Nov 24, 2021

During the build of a project, angular issues the following message:

- @stomp/ng2-stompjs [es2015/esm2015] (git+https://github.com/stomp-js/ng2-stompjs.git) Encourage the library authors to publish an Ivy distribution.

@jbakoc1
Copy link

jbakoc1 commented Jan 13, 2022

is this project deprecated? As I recall it's not updated from Angular 8

@kum-deepak
Copy link
Member

The answer is a bit long, I will add more details in a couple of days.

@kum-deepak
Copy link
Member

kum-deepak commented Jan 14, 2022

A bit of history:

  • First usable release was made in 2017.
  • The first decision point arose with the release of Angular 6, the same code could not have worked for Angular 6 and lower versions. The v4 of this library became usable for Angular v2 to v5. A v6 was released that worked with Angular 6.
  • During this time packaging this library as a usable npm package was a challenge. While Typescript had a well-defined way to generate dist files, Angular did not. Many thanks to the people behind https://github.com/ng-packagr/ng-packagr, which became a lifesaver.
  • Subsequent versions of Angular started posing interesting issues - if the library dist files were generated using a newer version of Angular, it stopped working for an older version of Angular, the Angular release cycle being quite rapid, users of this library were across more than 4 versions.
  • A conscious decision - to compile with the lowest possible feasible version - this way the same dist package worked with many different Angular versions.
  • At this time I realized that other than marking classes as Injectable there is no Angular specific code. So, in 2018, v7, I extracted the non-Angular-specific parts to https://github.com/stomp-js/rx-stomp. The effective size of ng2-stompjs was reduced to less than 20 lines.
  • My current estimate suggests that there are users surely on Angular 8, (probably on Angular 7 as well) using the latest version of ng2-stompjs.
  • Other than Angular Injectable, rx-stomp provides the same capabilities.

The current challenge is to support the widest range of Angular versions. Since this code is very simple, releasing more than one npm package with different names is not worth the effort.

Please voice your opinions and suggestions.

@kum-deepak
Copy link
Member

In the meanwhile please check https://github.com/stomp-js/ng2-stompjs/tree/develop/src/app. Other than https://github.com/stomp-js/ng2-stompjs/blob/develop/src/app/rx-stomp-service-factory.ts (which is 7-8 lines), all has 2 lines of code each.

@jbakoc1
Copy link

jbakoc1 commented Jan 17, 2022

@kum-deepak it's clear now. Correct me if I am wrong, all the work is done from the 2 other deps and the ng2-stompjs uses rx-stomp which is a wrapper of stompjs.
image
Maybe there can be 2 versions ivy/viewengine?

@kum-deepak
Copy link
Member

kum-deepak commented Jan 28, 2022

Yes, your understanding is correct; all the work is done by the underlying library rx-stomp. rx-stomp, while a wrapper over stompjs, adds important functionality.

As the first step, I will update the Angular sample to use rx-stomp directly and find out the extent of change needed.

@Dinika
Copy link

Dinika commented Jun 22, 2022

@kum-deepak Are there any updates on this (I am open to contributing if needed)?

@kum-deepak
Copy link
Member

I have written a guide https://stomp-js.github.io/guide/rx-stomp/ng2-stompjs/ng2-stompjs-to-rx-stomp.html, please check and see if it works for you.

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

No branches or pull requests

4 participants