msoucy / dproto

D Protocol Buffer mixins to create structures at compile time
Boost Software License 1.0
37 stars 16 forks source link

Fix code to work with dmd 2.083 #137

Closed Marenz closed 4 years ago

msoucy commented 5 years ago

Can you demonstrate how this breaks? It seems to work fine for me with dmd 2.086

Marenz commented 5 years ago

Did you use the dev-1.x branch?

msoucy commented 5 years ago

Yes - there are several deprecations (not surprising, considering that I haven't touched the 1.x branch in years, and wouldn't recommend anyone use it) but running a dub test still passes successfully.

Per 19.16.8.3 of the dlang standard, the code you modify is correct.

Please provide a sample that shows how the current code breaks using the latest compiler, that is fixed by your patch, so I can see what behavior causes problems.

Marenz commented 5 years ago

wouldn't recommend anyone use it

I have to use it because the 2.x version removed a feature that I needed in my projects

Specifcally, I am getting this error:

../../.dub/packages/dproto-1.3.2/dproto/import/dproto/buffers.d(297,7): Error: scope variable val assigned to this with longer lifetime

running a simple dub test in the dproto causes this error. I ran it with dmd 2.083.1

Marenz commented 5 years ago

hmm indeed, the error is gone on the newer dmds..

msoucy commented 5 years ago

I can't find which version fixed it, but it is indeed fixed in 2.086.0