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

Version 7 -> 8 Roadmap #6367

Open
26 of 40 tasks
benlesh opened this issue May 5, 2021 · 17 comments
Open
26 of 40 tasks

Version 7 -> 8 Roadmap #6367

benlesh opened this issue May 5, 2021 · 17 comments
Labels
7.x Issues and PRs for version 7.x 8.x Issues and PRs for version 8.x AGENDA ITEM Flagged for discussion at core team meetings

Comments

@benlesh
Copy link
Member

benlesh commented May 5, 2021

NOTE (10/28/2024): RxJS 8 is on hold while observable is being standardized for the web platform. RxJS 8 should match the web platform as much as possible and support it directly. 7.0 is stable, running well, and overall solid.

This issue is outlining what needs to be done in version 7 before we can move to version 8 in earnest.

  1. Once ALL items in version 7 are complete, we can consider moving the 8.x branch to master, and create a 7.x` branch.
  2. Once ALL items in version 8 are finalized and implemented, we can move from 8.x.x-alpha to 8.x.x-beta.

In Version 7

Before Version 8 is released

  • Remove all deprecated APIs marked to be removed in v8 or marked deprecated ages ago.
  • Remove source parameters from predicates. (Deprecating these via the type system effects problems - see chore: deprecate thisArg signatures #6361.)
  • Ensure we're publishing only ES2021 or later and CJS. Drop tslib. (ESM version is never used #6321)
  • Drop all Internet Explorer support into a pit of flames! 🔥 IE 🔥 🥳
  • Idempotent subscription add (feat(Subscription): idempotent add and remove of teardowns #6401)
  • Replace all external uses of any with unknown. (This could likely be non-breaking, FWIW.)
  • productize our internals for creating operators (Productize operator creation internals #6803)
  • Implement [Symbol.asyncIterator]() on Observable (TBD. We should try this out in an alpha, at least. Issue: Implement Symbol.asyncIterator on Observable #6857)
  • Convert repo to monorepo (Monorepo and Splitting Out To Different Packages #6786)
    • Docs app can be a separate project under monorepo
    • Operator Decision Tree can also likely be its own project under monorepo
    • Keep rxjs as "whole package". (It's not going away, ever, really)
    • Publish @rxjs/observable with just Observable.
    • Publish @rxjs/ajax
    • Publish @rxjs/fetch
    • Publish @rxjs/testing
    • Decide on how we'll do other packages: Current thoughts are that we could publish a package for each operator, even. Subjects and multicasting might be trickier, but maybe not. Maybe individual packages is right for all. Needs discussion.
  • ??? TBD

During Version 8

@benlesh benlesh added 7.x Issues and PRs for version 7.x 8.x Issues and PRs for version 8.x AGENDA ITEM Flagged for discussion at core team meetings labels May 5, 2021
@ReactiveX ReactiveX locked as off-topic and limited conversation to collaborators May 5, 2021
@ReactiveX ReactiveX unlocked this conversation May 5, 2021
@kbrilla
Copy link

kbrilla commented May 18, 2021

🔥 IE 🔥 🥳 - every time I see that statement in some repo it makes my day better

@MaximeBernard
Copy link

Since "??? TBD" seems to imply we can suggest anything, what about #2686?

It seems to be a recurring "issue" people are having to configure headers for every request (most popular seem to be Bearer, CorrelationId and Content-Type).

While it's not "hard" to make your own ajax, I feel it's a bit sad everyone has to write that piece of code and it might be helpful for everyone to have an helper provided by rxjs.

benlesh added a commit to benlesh/rxjs that referenced this issue Mar 4, 2022
benlesh added a commit to benlesh/rxjs that referenced this issue Mar 4, 2022
Deprecating MapTo variants, as they were only wrappers around the Map variants, and added unnecessary API surface area.

related ReactiveX#6367
benlesh added a commit to benlesh/rxjs that referenced this issue Mar 4, 2022
Deprecating MapTo variants, as they were only wrappers around the Map variants, and added unnecessary API surface area.

related ReactiveX#6367
resolves ReactiveX#6399
benlesh added a commit that referenced this issue Mar 7, 2022
@benlesh benlesh pinned this issue Mar 7, 2022
benlesh added a commit that referenced this issue Mar 8, 2022
* chore: deprecate MapTo variants

Deprecating MapTo variants, as they were only wrappers around the Map variants, and added unnecessary API surface area.

related #6367
resolves #6399

* chore: fix up deprecation messages
@PowerKiKi
Copy link

Wouldn't publishing multiple packages for what is essentially the same code actually increase risk of non tree shakable use-case and thus increase bundle size ?

As seen with lodash, if one of my dependency decides to depends on the future @rxjs/observable, but my app depends on the current rxjs, then all the code from @rxjs/observable will essentially be bundled twice, won't it ?

And of course it would be much worse if we actually publish a package for each operator. Then a single operator could be bundled three times if my deps happened to depend on rxjs, @rxjs/operators and say @rxjs/operators-map.

I could also imagine compatibility issues if one of my dependency depends on an old version of @rxjs/observable and my app pass one of those object to a new, incompatible version of an operator coming from the latest version of rxjs. This kind of issue already happened with the graphql package where they had to add manual check in their code to throw error if it happens.

That seems a lot of tricky tradeoffs to attempt to solve the issue of bundle size that is already properly solved by tree shaking.

Is that really worth it ? 🤔

@alfaproject
Copy link

It looks like the items for version 7 are all done except one. Is there any progress? Feels a bit stagnated ):

@akakira
Copy link

akakira commented Sep 20, 2022

Do you honestly think this signature change on the subscribe, etc. methods is critical enough to cause billions of lines of code change across the internet?

@edwardaskew
Copy link

You seem to have "Publish @rxjs/fetch" twice. I'm sure it will be an awesome package but it probably only needs to be done once 😋

@PowerKiKi
Copy link

@benlesh, it seems development toward v8 is picking up lately. However I am not aware that the concerns expressed in #6367 (comment) and #6786 (comment) have been addressed. And it seems a few persons are sharing those concerns.

Is the plan still to split in multiple, possibly redundant, packages ? What's the team opinion about the pitfalls of such a strategy, as experienced by lodash and graphql (for example) ?

@43081j
Copy link
Contributor

43081j commented Dec 28, 2023

have you considered 8.x being your first esm-only version of rxjs? seems to me it is the ideal opportunity to do that.

we're now at a point where most consumers are on a version of node which is capable of importing ESM packages, and all popular bundlers are too.

anyone who can only use CJS must be on a fairly old node version, so are likely going to be fine sticking to rxjs 7.x.

there's a few hazards and disadvantages with dual packages (esm + cjs), and the complexity of the build scripts for contributors/maintainers etc.

you mentioned you considered publishing CJS and ESM packages separately, but i wouldn't bother to be honest. many other packages have already moved to pure ESM and consumers managed fine, imo we could do the same here.

@muuvmuuv
Copy link

muuvmuuv commented Jan 2, 2024

Just tested latest alpha release and these errors appear, is that on purpose? If yes, I would go and open issues on GH for these.
SCR-20240102-odhu

@benlesh
Copy link
Member Author

benlesh commented Jan 4, 2024

Wouldn't publishing multiple packages for what is essentially the same code actually increase risk of non tree shakable use-case and thus increase bundle size ?

It shouldn't... rxjs itself will re-export @rxjs/observable, @rxjs/fetch, et al. So there's only really one copy of those dependencies. The only real risk is the same risk we've always had, where a dependency can depend on rxjs@7, and some other dep uses rxjs@6, and then you can depend on rxjs@8 and you end up with three different versions in your codebase... you're doomed in that scenario even WITHOUT this change.

@benlesh
Copy link
Member Author

benlesh commented Jan 4, 2024

Do you honestly think this signature change on the subscribe, etc. methods is critical enough to cause billions of lines of code change across the internet?

Yes. In order to align with native observables, the change to subscribe is required to move forward. However, you're wrong that it will "cause billions of lines of code change". Whatever version of RxJS that code is using will still exist. There's very, very little chance of any security issues or reasons to change those old versions, and if there were, we'd just fix it and publish a new 7.x or whatever.

@benlesh
Copy link
Member Author

benlesh commented Jan 4, 2024

have you considered 8.x being your first esm-only version of rxjs?

We can't really do this yet. There are way too many people using RxJS with CJS still. Myself included.

@benlesh
Copy link
Member Author

benlesh commented Jan 4, 2024

For those of you wondering about the path of different packages for each thing... the primary motivator is around how many libraries choose to use some other, untested, and or cobbled-together observable implementation because they "don't want all of RxJS". This causes us to end up shipping our observables alongside other people's observables in the same bundles, and then it causes developers to need to deal with interop, etc.

Ideally, we can convince developers that want observables to use the most battle tested and common implementation, at least until native observables land.

@stijns96
Copy link

What is the status of this?

@benlesh
Copy link
Member Author

benlesh commented Oct 29, 2024

Right now, version 8 is on hold because it doesn't make sense to release a new major version of RxJS, then have to write a new major version to match the observable landing in the Web Platform.

@Alex3917
Copy link

@benlesh Is the idea then that version 8 will eventually be released using a polyfilled version of the Web Platform observable?

@benlesh
Copy link
Member Author

benlesh commented Oct 29, 2024

There will be an optional polyfill, or an identical observable to directly import. The RxJS observable will pass all web platform tests as well, and there will be some backwards compat solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7.x Issues and PRs for version 7.x 8.x Issues and PRs for version 8.x AGENDA ITEM Flagged for discussion at core team meetings
Projects
None yet
Development

No branches or pull requests