www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Deprecation in traits

reply Frak <frak gmail.com> writes:
Hi folks,

I've this:

/Users/frak/dlang/ldc-1.23.0/bin/../import/std/traits.d(3711): 
Deprecation: function `std.typecons.Nullable!long.Nullable.get_` 
is deprecated - Implicit conversion with `alias Nullable.get 
this` will be removed after 2.096. Please use `.get` explicitly.

I'm trying to find out WHERE this is generated to fix it, 
dependency included, without success.

Suggestions?
Sep 29 2020
next sibling parent reply Steven Schveighoffer <schveiguy gmail.com> writes:
On 9/29/20 1:08 PM, Frak wrote:
 Hi folks,
 
 I've this:
 
 /Users/frak/dlang/ldc-1.23.0/bin/../import/std/traits.d(3711): 
 Deprecation: function `std.typecons.Nullable!long.Nullable.get_` is 
 deprecated - Implicit conversion with `alias Nullable.get this` will be 
 removed after 2.096. Please use `.get` explicitly.
 
 I'm trying to find out WHERE this is generated to fix it, dependency 
 included, without success.
 
 Suggestions?
Because it's probably coming from a constraint, you probably can't figure out the exact usage. What's more annoying is that likely it is a spurious warning. A lot of traits "try something", and then alias to false or true depending on what works. But it's not going to make a difference in your code. It's one of the most annoying things in the library. If you see this warning coming from *your* code, then you should fix it. But it will tell you the location if that was the case, not std.traits. -Steve
Sep 29 2020
parent reply Frak <frak gmail.com> writes:
On Tuesday, 29 September 2020 at 18:25:03 UTC, Steven 
Schveighoffer wrote:
 On 9/29/20 1:08 PM, Frak wrote:
 Hi folks,
 
 I've this:
 
 /Users/frak/dlang/ldc-1.23.0/bin/../import/std/traits.d(3711): 
 Deprecation: function 
 `std.typecons.Nullable!long.Nullable.get_` is deprecated - 
 Implicit conversion with `alias Nullable.get this` will be 
 removed after 2.096. Please use `.get` explicitly.
 
 I'm trying to find out WHERE this is generated to fix it, 
 dependency included, without success.
 
 Suggestions?
Because it's probably coming from a constraint, you probably can't figure out the exact usage. What's more annoying is that likely it is a spurious warning. A lot of traits "try something", and then alias to false or true depending on what works. But it's not going to make a difference in your code. It's one of the most annoying things in the library. If you see this warning coming from *your* code, then you should fix it. But it will tell you the location if that was the case, not std.traits. -Steve
That's REALLY REALLY annoying! I'm spending LOT of time trying to figure out the exact point to fix in the code. Any idea? dustmite?
Sep 30 2020
parent reply Stefan Koch <uplink.coder gmail.com> writes:
On Wednesday, 30 September 2020 at 08:33:58 UTC, Frak wrote:
 On Tuesday, 29 September 2020 at 18:25:03 UTC, Steven 
 Schveighoffer wrote:
 On 9/29/20 1:08 PM, Frak wrote:
 [...]
Because it's probably coming from a constraint, you probably can't figure out the exact usage. What's more annoying is that likely it is a spurious warning. A lot of traits "try something", and then alias to false or true depending on what works. But it's not going to make a difference in your code. It's one of the most annoying things in the library. If you see this warning coming from *your* code, then you should fix it. But it will tell you the location if that was the case, not std.traits. -Steve
That's REALLY REALLY annoying! I'm spending LOT of time trying to figure out the exact point to fix in the code. Any idea? dustmite?
You can give me access to the code and I can find it out for you. That's the best I have.
Sep 30 2020
parent Frak <frak gmail.com> writes:
On Wednesday, 30 September 2020 at 09:42:40 UTC, Stefan Koch 
wrote:
 On Wednesday, 30 September 2020 at 08:33:58 UTC, Frak wrote:
 On Tuesday, 29 September 2020 at 18:25:03 UTC, Steven 
 Schveighoffer wrote:
 On 9/29/20 1:08 PM, Frak wrote:
 [...]
Because it's probably coming from a constraint, you probably can't figure out the exact usage. What's more annoying is that likely it is a spurious warning. A lot of traits "try something", and then alias to false or true depending on what works. But it's not going to make a difference in your code. It's one of the most annoying things in the library. If you see this warning coming from *your* code, then you should fix it. But it will tell you the location if that was the case, not std.traits. -Steve
That's REALLY REALLY annoying! I'm spending LOT of time trying to figure out the exact point to fix in the code. Any idea? dustmite?
You can give me access to the code and I can find it out for you. That's the best I have.
Thank you, but unfortunately that's not possible
Sep 30 2020
prev sibling next sibling parent =?UTF-8?Q?Ali_=c3=87ehreli?= <acehreli yahoo.com> writes:
On 9/29/20 10:08 AM, Frak wrote:
 Hi folks,
 
 I've this:
 
 /Users/frak/dlang/ldc-1.23.0/bin/../import/std/traits.d(3711): 
 Deprecation: function `std.typecons.Nullable!long.Nullable.get_` is 
 deprecated - Implicit conversion with `alias Nullable.get this` will be 
 removed after 2.096. Please use `.get` explicitly.
 
 I'm trying to find out WHERE this is generated to fix it, dependency 
 included, without success.
 
 Suggestions?
I've just ported my code to 2.094 and had to clean up that issue. Luckily, in my case they were all in user code. I had to access my Nullable objects with .get: if (n) { // n.foo(); <-- from n.get.foo(); <-- to } So, look at all your Nullable objects maybe. Ali
Sep 29 2020
prev sibling parent reply Basile B. <b2.temp gmx.com> writes:
On Tuesday, 29 September 2020 at 17:08:40 UTC, Frak wrote:
 Hi folks,

 I've this:

 /Users/frak/dlang/ldc-1.23.0/bin/../import/std/traits.d(3711): 
 Deprecation: function 
 `std.typecons.Nullable!long.Nullable.get_` is deprecated - 
 Implicit conversion with `alias Nullable.get this` will be 
 removed after 2.096. Please use `.get` explicitly.

 I'm trying to find out WHERE this is generated to fix it, 
 dependency included, without success.

 Suggestions?
The problem has been observed already and it is an official enhancement request [1]. I think it is legit because deprecation are sometimes used to help into refactoring, so to have the use site is a essential. [1] https://issues.dlang.org/show_bug.cgi?id=21176
Sep 30 2020
parent Ben Jones <fake fake.fake> writes:
On Wednesday, 30 September 2020 at 18:18:48 UTC, Basile B. wrote:
 On Tuesday, 29 September 2020 at 17:08:40 UTC, Frak wrote:
 Hi folks,

 I've this:

 /Users/frak/dlang/ldc-1.23.0/bin/../import/std/traits.d(3711): 
 Deprecation: function 
 `std.typecons.Nullable!long.Nullable.get_` is deprecated - 
 Implicit conversion with `alias Nullable.get this` will be 
 removed after 2.096. Please use `.get` explicitly.

 I'm trying to find out WHERE this is generated to fix it, 
 dependency included, without success.

 Suggestions?
The problem has been observed already and it is an official enhancement request [1]. I think it is legit because deprecation are sometimes used to help into refactoring, so to have the use site is a essential. [1] https://issues.dlang.org/show_bug.cgi?id=21176
Does compiling with -v help? I think it might at least show you which module the issue is coming from?
Sep 30 2020