[RFC] Compatibility layer
See original GitHub issueOne problem we’re going to be facing, now that I’m thinking about it:
We will be introducing the ability to specify a custom output format with #582.
This new output support (the env-var support) won’t be available for older versions, which means debug
will now be showing different output formats for old versions of the library, which is a problem since debug
is almost as old as node.js IIRC.
That means users that set DEBUG_FORMAT
will see inconsistent output formats for code that is any older than the new major version release.
Should there be a compatibility layer introduced in the newest version that sniffs out older versions of debug
and patches them up, being version-aware in terms of the API?
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
[RFC] back on nf_tables (plus compatibility layer) - LWN.net
Hi, I've been working for a while to recover nf_tables kernel patches and to implement a compatibility layer so it can be used...
Read more >Re: [Quilt-dev] [RFC] compatibility layer - GNU mailing lists
Subject: Re: [Quilt-dev] [RFC] compatibility layer ... For the compatibility symlinks, you redefine the FOO variables in Makefile > (e.g., BASH).
Read more >IPv6 Enterprise Network Analysis - IP Layer 3 Focus RFC 4852
Abstract This document analyzes the transition to IPv6 in enterprise networks focusing on IP Layer 3. These networks are characterized as having multiple ......
Read more >RFC 6101: The Secure Sockets Layer (SSL) Protocol Version ...
This document specifies version 3.0 of the Secure Sockets Layer (SSL 3.0) ... RFC 6101 The SSL Protocol Version 3.0 August 2011 Forward...
Read more >Re: [RFC] back on nf_tables (plus compatibility layer) - Jan Engelhardt
... Linux Networking Developer Mailing List <netdev@vger.kernel.org> Subject: Re: [RFC] back on nf_tables (plus compatibility layer) Date: Wed, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I don’t think it’s feasible to backport to all old versions. Some packages might even have the dependency locked to a specific
debug
version too, so it would not work then. And if you can’t reliably do for all situations, is there really any point.This would be a good time to come up with some way to monkeypatch that would let you introduce other flags and changes in the future too. Maybe by making all the
debug()
instances minimal with a well defined transport that will never change and have the core as a singleton that mediates those minimal instances, where it uses the newest registered core. Since the latest version always becomes the singleton, it knows how to handle all older versions.Well if we monkey patch then maybe we can funnel into a log handler, which can then be plugged into optionally by
node -r
. Then we could have a json log consumer and not have to deal with those formatters (cc @chagris).Best of both worlds.