> The *next* one. I see forward using it *for the next one*, not the last
> _______________________________________________
> erlang-questions mailing list
> erlang-q...@erlang.org
> http://erlang.org/mailman/listinfo/erlang-questions
>
--
Loïc Hoguin
https://ninenines.eu
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
I agree with Heinz. The deprecation of gen_fsm forced me to stuck on OTP 19 and I dont see any reasonable path to upgrade.
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions
Are they?
Code removal is an important problem which can't be avoided when you
have to support OTP versions before/after. So is fundamental additions
to the language (like maps). But I don't think warnings are nearly as
important, particularly deprecation warnings.
Deprecation warnings signal that your code will stop working one day in
the future so they are useful, but they say nothing of your code TODAY
which is what matters most. The code still builds and works fine
regardless of the warning.
I would say it's important to know that the code will stop working at
some point in the future so you can plan migrating the code. But you
still have at least a year to figure it out, it's not OTP-21 that breaks
your code, it will be OTP-22 or a later release.
If I was in your situation I would adopt the following strategy:
* Disable the deprecation warnings in normal builds
* Setup a separate build task/CI job for compiling with deprecation
warnings (xref checks those too IIRC)
* Open a ticket to remember to fix those and/or change the supported OTP
versions within that timespan
Dropping older versions will work even for many libraries because most
users are on the last 2-3 releases anyway. There's of course exceptions.
In general I would also say that while it's usually a good idea to fix
new warnings, sometimes the fix is uglier than the warning. If you need
to depend on externally defined macros or rewrite huge chunks of the
code to fix a warning, you might want to just leave the warning around
or disable it for now.
Warnings are great to anticipate problems but they should by no means
prevent working code from working.
All that being said, I think the OTP team has been a little too
aggressive with changes lately. It would be better to deprecate two
releases before removal (introduce gen_statem in 20, deprecate gen_fsm
in 21 and remove gen_fsm in 23). That would make transitioning easier
because one could switch from gen_fsm to gen_statem during the OTP-22
era while still supporting the last 3 releases and therefore the
majority of users would be unaffected.
Cheers,
--
Loïc Hoguin
https://ninenines.eu
The thing that I'm a bit unsure about is that deprecation is used as a warning to say something is:a) no longer the favored mechanism to do somethingb) will eventually be removed.I can tolerate warnings for a) and ignore them, but I don't want to do it for b) unless I do not know how long a thing will be deprecated for.
_______________________________________________
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions
To echo Heinz's point, is there a *reason* for the deprecation?Enquiring minds want to know...
Hi!
2018-05-04 14:40 GMT+02:00 Mahesh Paolini-Subramanya <mah...@dieswaytoofast.com>:
To echo Heinz's point, is there a *reason* for the deprecation?
Enquiring minds want to know...
Th point is to phase out gen_fsm. The deprecated warning is important to get new users to choose gen_statem. Also if you have a living product you will probably be better of in the long run changing to gen_statem. Thisis not a complicated change and an exampel of how to do it is given in the gen_fsm manual page. Of course we give lots of time to adopt. We have no plan of removing the gen_fsm code swiftly, it is there in 20 and 21.I can see the deprecating process needs to enhanchend, and yes it sort of has more that one purpose which seems to conflict a bit.
So you have
- ‘soft-deprecation’ with doc notes, but no compiler warnings
- ‘hard-deprecation’ with compiler warnings, but no feature removal
I suggest the third stage would be:
-
‘end-of-life’ with compiler warnings, and there is a
known future release when the original feature will vanish
Mike
What about documentation from the OTP team that outlines a deprecation policy? It may be a good opportunity to also outline other compatibility guarantees, such as the compiled bytecode guarantees and the node compatibility guarantees, if such are not yet documented.
--We did define such document not long ago for Elixir. In terms of deprecations, we have two terms: "soft-deprecation" and "hard-deprecation". The soft-deprecation is added as soon as a new implementation exists. At this point we don't emit any warnings, but we do update the docs to say the feature will warn in the future and start to point folks towards better ways.A hard-deprecation is when we finally start emitting warnings. A hard-deprecation can only be added after an alternative exists for at least 2 Elixir releases. This is very important because it means that, once a feature is hard deprecated, you know you can use the proposed alternative and that alternative is supported at least two versions back.This is only necessary if a feature is being replaced. In case a feature is being removed, such as non-smp VM versions, you may skip directly to the "hard-deprecation" and emit warnings straight-away since there won’t be an alternative in the future anyway.I am not proposing for Erlang/OTP team to follow those rules and conventions but writing *some* rules as minimum guarantees may improve communication and help the community plan in terms of warnings, deprecations and removals accordingly. I would just avoid emitting deprecation warnings in the same version that an alternative is introduced, because it means library developers need to either only support the latest version or introduce conditionals (either at compile-time or runtime) to support multiple versions.José ValimFounder andDirector of R&D
On Mon, May 7, 2018 at 8:54 AM, José Valim <jose....@gmail.com> wrote:What about documentation from the OTP team that outlines a deprecation policy? It may be a good opportunity to also outline other compatibility guarantees, such as the compiled bytecode guarantees and the node compatibility guarantees, if such are not yet documented.I think it is a good idea to describe the OTP policy regarding deprecation, backward compatibility, supported releases etc. in one place. Will try to have it available before the OTP 21 release.