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.

WANTED: Means of having deprecation messages only in development build

See original GitHub issue

There are methods of doing things we want to warn people are going to be deprecated in upcoming major releases of RxJS. Currently we don’t have anything in place to report these problems to the user in such a way that it doesn’t intrude on production.

Ideally a solution for this would:

  • report that deprecated features are being used on build if the user is bundling somehow (Angular CLI, Webpack, etc)
  • warn in console that deprecated features are being used, but only when Rx.min.js was being used
  • Not intrude or spam in production apps, or at leas do so as minimally as possible.

Looking for any thoughts, ideas or prior knowledge of how to go about this. Especially from other library owners that may have already solved this problem.

This is a critcal thing for RxJS to advance in the most friendly way possible

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
jayphelpscommented, Jun 19, 2017

yup process.env.NODE_ENV !== 'production' is the way to go.

0reactions
benleshcommented, Aug 18, 2020

I think that modern IDEs are taking care of some of this… and I believe that lint rules can do some of the work here as well. Closing for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deprecation warnings break app builds when "treat ... - GitHub
Deprecation warnings break app builds when "treat warnings as errors" is enabled #314.
Read more >
Deprecations by version - GitLab Docs
The VulnerabilityFindingDismiss GraphQL mutation is being deprecated and will be removed in GitLab 16.0. This mutation was not used often as the Vulnerability ......
Read more >
Did your team define own code deprecation strategy?
PHPStorm notifies when you use deprecated methods or class. The only thing we need is to add a @deprecated annotation to the DocBlock...
Read more >
Deprecations · Cloudflare Workers docs
The build.upload field is deprecated and will be removed in a future release. Its usage results in a warning with suggestions on rewriting...
Read more >
Dealing With Deprecations - GNOME Developer Documentation
One important thing to keep in mind is that 'deprecated' does not mean 'broken', or 'unusable'. There is no need to rush into...
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