question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Prefix internal operator functions to avoid bad imports

See original GitHub issue

Feature Request

Is your feature request related to a problem? Please describe. Importing operators & observables from the wrong path (rxjs/internal/operators/... instead rxjs/operators) of seems to be a common issue. Cf. https://github.com/ReactiveX/rxjs/issues/4363 switchMap not unsubscribing depending on import of Observable

Describe the solution you’d like Would that make sense to prefix these functions and classes with some special character (_ or ø) to avoid bad imports? If yes, I’ll be glad to contribute.

Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
cartantcommented, Mar 4, 2019

IMO, the effort required to add prefixes would be better applied elsewhere.

I would favour abandoning the "rxjs/operators" import location altogether and using "rxjs" for everything. This will be a possibility - in v7 - if the conflicting names - like concat and merge - are resolved either via the removal of deprecated operators or the renaming of the operators to mergeWith, etc.

0reactions
kwonojcommented, Jul 16, 2019

We may need some reorg in future major versions eventually, but I don’t think we’ll apply this kind of prefix at least. Will closing and improve over version changes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linter rules - Dart programming language
Avoid relative imports for files in lib/ . This rule is available as of Dart 2.0.0. Rule sets: core, recommended, flutter. This rule...
Read more >
Best Practices - Apache Airflow
Make sure to use variable with template in operator, not in the top level code. Bad example: from airflow.models import Variable foo_var = ......
Read more >
What does __all__ mean in Python? - Stack Overflow
from foo import * print(bar) print(baz) # The following will trigger an exception, as "waz" is not exported by the module print(waz).
Read more >
Functions, operators, and conditionals | BigQuery
This topic is a compilation of functions, operators, and conditional expressions. To learn more about how to call functions, function call rules, ...
Read more >
Google Python Style Guide
Use from x import y where x is the package prefix and y is the module name with ... Avoid nested functions or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found