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

Consider rename observable symbol $$observable => observable #2415

Closed
DzmitryShylovich opened this issue Feb 25, 2017 · 5 comments
Closed

Consider rename observable symbol $$observable => observable #2415

DzmitryShylovich opened this issue Feb 25, 2017 · 5 comments

Comments

@DzmitryShylovich
Copy link
Contributor

DzmitryShylovich commented Feb 25, 2017

Actual behavior:
I use transform-es2015-modules-umd Babel plugin. And I need to map import {$$observable} from 'rxjs/symbol/observable';

Observable symbol is exported as Rx.Symbol.observable but exported symbol from rxjs/symbol/observable is called $$observable. Because symbols have different names I cannot just map it like "rxjs/symbol/observable": "Rx.Symbol"

Expected behavior:
I see 3 possible solutions:

  1. Rename $$observable => observable so it will be possible to do "rxjs/symbol/observable": "Rx.Symbol"
  2. export $$observable from Rx as is => Rx.$$observable
  3. export $$observable from Rx.Symbol => Rx.Symbol.$$observable

I can also accomplish it by changing import import {$$observable} from 'rxjs/symbol/observable'; => import {Symbol} from 'rxjs/Rx'; but I don't want to import the whole lib :)

@DzmitryShylovich
Copy link
Contributor Author

@benlesh can you take a look please? async pipe is broken for rollup users because of this.
the simplest none breaking solution would be

export const $$observable = getSymbolObservable(root);
export const observable = $$observable;

@benlesh
Copy link
Member

benlesh commented Mar 3, 2017

@DzmitryShylovich Ugh. I see the problem. It sucks a little because I'm not sure what we'd do for a deprecation path for this. There's no way to detect if someone is using the "wrong" one via direct import, AFAICT.

DzmitryShylovich added a commit to DzmitryShylovich/rxjs that referenced this issue Mar 3, 2017
To migrate the code follow the example bellow:

Before:

import { $$observable } from 'rxjs/symbol/observable';

After:

import { observable } from 'rxjs/symbol/observable';

Closes ReactiveX#2415
@DzmitryShylovich
Copy link
Contributor Author

DzmitryShylovich commented Mar 3, 2017

@benlesh I submitted a pr #2435 It shouldn't be a breaking change.
please take a look when you'll have time. thanks

@DzmitryShylovich
Copy link
Contributor Author

ping @benlesh it also affects es5 users :)

DzmitryShylovich added a commit to DzmitryShylovich/rxjs that referenced this issue Mar 15, 2017
To migrate the code follow the example bellow:

Before:

import { $$observable } from 'rxjs/symbol/observable';

After:

import { observable } from 'rxjs/symbol/observable';

Closes ReactiveX#2415
DzmitryShylovich added a commit to DzmitryShylovich/rxjs that referenced this issue Mar 15, 2017
…ort Babel UMD and others

To migrate the code follow the example bellow:

Before:

import { $$observable } from 'rxjs/symbol/observable';

After:

import { observable } from 'rxjs/symbol/observable';

Closes ReactiveX#2415
DzmitryShylovich added a commit to DzmitryShylovich/rxjs that referenced this issue Mar 15, 2017
…ort Babel UMD and others

To migrate the code follow the example bellow:

Before:

import { $$observable } from 'rxjs/symbol/observable';

After:

import { observable } from 'rxjs/symbol/observable';

Closes ReactiveX#2415
DzmitryShylovich added a commit to DzmitryShylovich/rxjs that referenced this issue Mar 16, 2017
…ort Babel UMD and others

To migrate the code follow the example bellow:

Before:

import { $$observable } from 'rxjs/symbol/observable';

After:

import { observable } from 'rxjs/symbol/observable';

Closes ReactiveX#2415
benlesh pushed a commit that referenced this issue Apr 3, 2017
…o work with Babel UMD exporting (#2435)

* fix(symbol/observable): will be exported as observable to better support Babel UMD and others

To migrate the code follow the example bellow:

Before:

import { $$observable } from 'rxjs/symbol/observable';

After:

import { observable } from 'rxjs/symbol/observable';

Closes #2415

* fix(symbol/iterator): will be exported as iterator to better support Babel UMD and others

To migrate the code follow the example bellow:

Before:

import { $$iterator } from 'rxjs/symbol/iterator';

After:

import { iterator } from 'rxjs/symbol/iterator';

* fix(symbol/rxSubscriber): will be exported as rxSubscriber to better support Babel UMD and others

To migrate the code follow the example bellow:

Before:

import { $$rxSubscriber } from 'rxjs/symbol/rxSubscriber';

After:

import { rxSubscriber } from 'rxjs/symbol/rxSubscriber';
@lock
Copy link

lock bot commented Jun 6, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 2018
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

2 participants