-
Notifications
You must be signed in to change notification settings - Fork 200
Revamp Initializable and remove Migratable #12
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Can you move the PR to next
instead of master
, though?
}); | ||
}); | ||
|
||
describe('complex testing with inheritance', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add another suite where mother inherits from gramps as well, so we test a diamond-like inheritance graph?
f771e62
to
2774160
Compare
Rebased on |
@spalladino I changed the tested contracts into a diamond shaped inheritance as you suggested (kind of, as I didn't add a new suite, heh). I'm not sure how I feel about it though, because as we talked offline it will run the initializer twice, and although in this scenario the result ends up being correct, it might not always be the case. I suppose the warning on the |
@spalladino There's something we didn't think through: if we're removing For the record, we had agreed on removing What do you suggest we do? |
@frangio |
74ae79f
to
2235d9a
Compare
@spalladino I think the only error remaining is one in
|
6a733c1
to
586a738
Compare
9997555
to
35c3cf3
Compare
I added I removed the bump to 2.0.0-alpha because that wasn't going to fix anything. One last thing. Currently |
+1 on moving Initializable to the root of Contracts, while keeping the
deprecated Migratable in its old location
…On Thu, Aug 23, 2018 at 1:37 PM Francisco Giordano ***@***.***> wrote:
I added Migratable back in because due to Truffle's wrong handling of
nested dependencies, there was no way to make the openzeppelin-zos
package in lib-complex compile.
I removed the bump to 2.0.0-alpha because that wasn't going to fix
anything.
One last thing. Currently Initializable is in the contracts/migrations/
directory. We cannot rename the directory because of the same reason we had
to keep Migratable, but we could move Initializable somewhere else.
@spalladino <https://github.com/spalladino> What do you think?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAaOJH1dFSYu3iybudOQ3gt2W8lW-3iLks5uTtpBgaJpZM4V28XP>
.
|
35c3cf3
to
c49cf84
Compare
* update auto-generated package-lock.json * update Initializable tu support multiple inheritance * add more complex testing of Initializable with multiple inheritance * remove Migratable and move Initializable * change migratable to initializable in test comment * test diamond shaped inheritance * rename isInitializer to initializer * change docs to use new Initializable * fix tests * fix more docs * Revert "remove Migratable and move Initializable" This reverts commit fa54395. * finish adding back Migratable * add deprecation notice to Migratable * move Initializable to contracts root
* update auto-generated package-lock.json * update Initializable tu support multiple inheritance * add more complex testing of Initializable with multiple inheritance * remove Migratable and move Initializable * change migratable to initializable in test comment * test diamond shaped inheritance * rename isInitializer to initializer * change docs to use new Initializable * fix tests * fix more docs * Revert "remove Migratable and move Initializable" This reverts commit fa54395. * finish adding back Migratable * add deprecation notice to Migratable * move Initializable to contracts root
Fixes #2.
Enhances
Initializable
to make it usable with multiple inheritance, with the purpose of removingMigratable
(which was our current solution) because it leads to a confusing developer experience.Marking
in progress
because I should update the docs to reflect the new usage, but the code and tests can already be reviewed.