Fix linker error when building complex contracts#199
Merged
Conversation
b756dbe to
3af6fbe
Compare
3af6fbe to
5847584
Compare
Collaborator
|
Ahhh I was wondering what I was getting at in the original issue #60
|
Collaborator
Author
Yeah me too when I implemented it 😬. |
Collaborator
|
Well if I don't even understand my own cryptic comments I don't expect you to 😓 |
ascjones
reviewed
Feb 24, 2021
ascjones
approved these changes
Feb 24, 2021
Collaborator
ascjones
left a comment
There was a problem hiding this comment.
LGTM, we'll need to do a 0.9.1 release with this
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #198 and use-ink/ink#701.
My understanding is that the linker error was a result of conflicting build artifacts in the
targetdirectory.The root contract is build with the
ink-as-dependencyfeature enabled for sub-contracts, whereas the sub-contracts are build without this flag. This results in the external function__ink_generate_metadata(which is only build whenink-as-dependencyis disabled) not being available in the artifacts, but cargo still tries to reuse the artifacts. Hence the linker error.I fixed it now by building sub-contracts into sub-folders of
target/ink/. This way all artifacts are separate.