Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: address build failures in some contracts (#24) #35

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

0xf333
Copy link
Contributor

@0xf333 0xf333 commented Aug 8, 2023

The build process for some contracts was failing due to issues in certain Cargo.toml files;
Aside from some dependencies paths that needed to be adjusted, there seems to be conflicts with the crate-type setting when using the updated version of the Ink contract compiler. Additionally, the no_main attribute was missing in some contracts.

Description

  • Commented out crate-type in Cargo.toml files to resolve conflicts with the updated Ink contract compiler.
  • Fixed incorrect Ink dependency path.
  • Added the no_main attribute in lib.rs to address missing attributes in some contracts and prevent warning messages.

Impacts

This pull request addresses issue #24

.

@0xf333
Copy link
Contributor Author

0xf333 commented Aug 8, 2023

@SkymanOne

@SkymanOne
Copy link
Contributor

I think in this case and better course of action would be to use workspace dependencies like here use-ink/ink#1814

Copy link
Contributor

@SkymanOne SkymanOne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of the examples. Left a few comments. I would also use workspace settings in order to maintain all examples with the latest version of ink!
Alternatively, can please also update all contracts to point to the latest ink! minor version?

delegator/build-all.sh Outdated Show resolved Hide resolved
delegator/subber/Cargo.toml Outdated Show resolved Hide resolved
delegator/Cargo.toml Outdated Show resolved Hide resolved
delegator/Cargo.toml Outdated Show resolved Hide resolved
@0xf333 0xf333 force-pushed the 0xf333/fix_failing_contracts_build branch 2 times, most recently from 3942b7a to f47703a Compare August 10, 2023 02:01
@0xf333
Copy link
Contributor Author

0xf333 commented Aug 10, 2023

Thanks for taking care of the examples. Left a few comments. I would also use workspace settings in order to maintain all examples with the latest version of ink! Alternatively, can please also update all contracts to point to the latest ink! minor version?

Hi @SkymanOne ,
Changes requested have been implemented. However, the cargo-contract compiler currently seems to not support workspace inheritance feature; for more details, you can refer to this link:
use-ink/cargo-contract#1265

I would probably look into the issue #1265 myself and give it a try if I had the opportunity to focus full-time on these.

@0xf333 0xf333 requested a review from SkymanOne August 10, 2023 02:21
@0xf333 0xf333 force-pushed the 0xf333/fix_failing_contracts_build branch 2 times, most recently from 9372292 to ce476c3 Compare August 10, 2023 04:24
@SkymanOne
Copy link
Contributor

In this case, no need to bother with the workspace. As long as all dependencies are up to date, we should be good to go

delegator/adder/Cargo.toml Show resolved Hide resolved
Description
===========
The build process for some contracts was failing due
to issues in certain Cargo.toml files.

Changes
=======
- Commented out `crate-type` in `Cargo.toml` files.
  There's a conflict with this setting when using
  the updated version of the Ink contract compiler.

- Added `no_main` attribute in `lib.rs`. This was
  missing in some contracts, and the updated version
  of the compiler is printing warning messages when
  it's missing.

This commit addresses issue use-ink#24
@0xf333 0xf333 force-pushed the 0xf333/fix_failing_contracts_build branch from ce476c3 to a2f1901 Compare August 12, 2023 00:13
@0xf333 0xf333 requested a review from SkymanOne August 12, 2023 00:16
@SkymanOne SkymanOne merged commit cba01f7 into use-ink:main Aug 14, 2023
@0xf333 0xf333 deleted the 0xf333/fix_failing_contracts_build branch May 9, 2024 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants