什么是D3js版本支持政策? [英] What is D3js version support policy?
问题描述
我是D3js
的新手,在开始使用之前我想了解如何管理内核和插件的版本,所以我不会发现自己被旧的不受支持的版本所困扰或使用太实验化了.
I'm new to D3js
and before getting started I want to understand how versions for the core and plugins are managed so I don't find myself stuck with an old unsupported versions or using something that's too experimental.
如果查看发布历史记录,我会发现v4
是在Jun 2016
中引入的( https://github.com/d3/d3/releases?after=v4.1.0 )和v5
在Jan 2018
中(
If I look at the release history I see that v4
was introduced back in Jun 2016
(https://github.com/d3/d3/releases?after=v4.1.0) and v5
in Jan 2018
(https://github.com/d3/d3/releases?after=v5.0.1).
但是,当我在图库中查看D3js
代码时( https://github. com/d3/d3/wiki/Gallery ),我看到它大部分是基于v3
的,而v3
是后面的2
主要版本.
Yet, when I look at D3js
code on the gallery (https://github.com/d3/d3/wiki/Gallery), I see that most of it is based on v3
which is 2
major releases behind.
例如,如果我使用 Sankey示例于2018年5月更新,它仍然基于v5
,则会损坏.
For instance if I take a Sankey example updated in May 2018 it's still based on v3
, and if I try to replace it with v5
it breaks.
另一个示例:某人在2017年2月遇到了v4
问题,以及当时和2017年4月的答案仍然无效(尽管在发布v4
大约一年后的时间v4.8
:
Another example: someone had an issue with v4
back in Feb 2017, and the answer at the time and in April 2017 it was still not working (despite it was already v4.8
at the time, nearly 1 year after the release of v4
) :
所以v4/v5
似乎是与v3
完全不同的分支,甚至不向后兼容.
So it seems that v4/v5
are completely different branches from v3
and are not even backwards compatible.
提出我的问题:
-
v5
在什么程度上与v3
向后兼容? -
v3
仍将支持多长时间?
- To what extent is
v5
backward compatible withv3
? - How long will
v3
still be supported?
推荐答案
将注释合并为1个综合答案:
Consolidating comments as 1 comprehensive answer:
一般哲学
鉴于D3创建者是主要由他自己创建/维护库的事实,这似乎是可以理解的,没有足够的资源来进行向后兼容设计或维护旧代码.
General philosophy
It seems, and it's understandable given the fact that D3 creator is creating/maintaining the library mostly by himself, that there isn't enough resources to design with backwards-compatibility nor maintain old code.
要选择哪个版本
鉴于以上所述,从头开始时,选择最新版本似乎是最明智的选择.
Which version to choose
Given the above, when starting fresh, it seems picking the latest version is the most sensible choice.
向后兼容
从v3
到v5
( v5 删除了d3-queue
,d3-request
,schemeCategory20
...).因此,如果将来引入其他向后不兼容的更改,也不会感到震惊.
Backward compatibility
There have been backward incompatible changes going from v3
to to v5
(v5 removed d3-queue
, d3-request
, schemeCategory20
...). So it wouldn't be a shocker if in the future other backward incompatible changes are introduced.
旧版支持
似乎在发布新版本的那一刻,对旧版本的支持被放弃了,所有精力都集中在新版本上:
https://twitter.com/mbostock/status/764274097995907072
Legacy support
It seems the moment a new version is released, support for the older version is abandoned and all efforts are focused on the new version:
https://twitter.com/mbostock/status/764274097995907072
这篇关于什么是D3js版本支持政策?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!