sociomantic-tsunami / tangort

Tango D1 runtime library
Other
0 stars 9 forks source link

Deprecate `init` into `initializer` #34

Closed mihails-strasuns-sociomantic closed 6 years ago

mihails-strasuns-sociomantic commented 6 years ago

Matches change in D2 runtime intended to avoid confusion with built-in T.init

nemanja-boric-sociomantic commented 6 years ago

The swarm case:

https://github.com/sociomantic-tsunami/swarm/blob/8d382b5f788523f9633a49227a89d13f33c488a3/src/swarm/neo/node/ConnectionHandler.d#L646-L653

nemanja-boric-sociomantic commented 6 years ago

(the problem is that you need to differentiate between TypeInfo.init - the property of the TypeInfo type itself and the initializer for the given user type represented by the particular TypeInfo instance).

mihails-strasuns-sociomantic commented 6 years ago

In one of our apps there was about a dozen of places where initializer was used - I fired this PR after having to version them all out to test with more recent compiler :)

mihails-strasuns-sociomantic commented 6 years ago

how didn't we hit it before

It only got deprecated in 2.074 or something like that

mihails-strasuns-sociomantic commented 6 years ago

Updated: clean up legacy double object.di situation

nemanja-boric-sociomantic commented 6 years ago

Missing release notes.

mihails-strasuns-sociomantic commented 6 years ago

Updated to make it a new alias instead of deprecating new field. Looks like there is some relation between dmd1 and tangort about naming expectation so when I changed old fields, tests started to fail with wrong initializers.

This is simpler and will also do fine for our need.

mihails-strasuns-sociomantic commented 6 years ago

Are you sure it is OK?

Yes (both because it is how it is done in druntime now and because of checking compiler :)).

mihails-strasuns-sociomantic commented 6 years ago

Do we want to do this now that tango RT will be abandoned soon?

Not sure. It is rather annoying thing to version out for DMD 2.074+ but we can live without it. Change itself is also pretty simple though.

mihails-strasuns-sociomantic commented 6 years ago

Ping @leandro-lucarella-sociomantic

mihails-strasuns-sociomantic commented 6 years ago

Ping @leandro-lucarella-sociomantic

mathias-baumann-sociomantic commented 6 years ago

Can I try as well? Okay, here we go!

Ping @leandro-lucarella-sociomantic

leandro-lucarella-sociomantic commented 6 years ago

I hope we don't regret it...