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

Remove compile_as_dependency config option #1168

Merged
merged 6 commits into from
Mar 9, 2022

Conversation

HCastano
Copy link
Contributor

@HCastano HCastano commented Mar 8, 2022

This PR removes the compile_as_dependency configuration option on the main
ink::contract macro. The rational here is that this is an option which isn't really
needed/used and removing it simplifes the ink! language a bit.

This functionality isn't needed since we can achieve the same result with the
ink-as-dependency crate feature.

As an additional argument for removing it, quoting the old docs:

The author is not aware of any particular practical use case for users that
makes use of this flag but contract writers are encouraged to disprove this.

This was split out from #1163.

@paritytech-cicd-pr
Copy link

🦑 📈 ink! Example Contracts ‒ Changes Report 📉 🦑

These are the results when building the examples/* contracts from this branch with cargo-contract 0.17.0-536caf5 and comparing them to ink! master:

Δ Optimized Size Δ Used Gas Total Optimized Size Total Used Gas
accumulator 1.13 K
adder 2.13 K
contract-introspection 2.38 K
contract-terminate 0.94 K 214_418
contract-transfer 8.15 K 14_418
delegator 6.11 K 46_471
dns 9.39 K 43_254
erc1155 27.23 K 86_508
erc20 8.95 K 43_254
erc721 13.27 K 115_344
flipper 1.41 K 14_418
incrementer 1.30 K 14_418
multisig 25.86 K 93_983
proxy 3.12 K 29_555
rand-extension 4.21 K 14_418
subber 2.15 K
trait-erc20 9.23 K 43_254
trait-flipper 1.10 K 14_418
trait-incrementer 1.27 K 28_836

Link to the run | Last update: Tue Mar 8 05:34:10 CET 2022

@codecov-commenter
Copy link

codecov-commenter commented Mar 8, 2022

Codecov Report

Merging #1168 (62cb20e) into master (776df42) will increase coverage by 0.13%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1168      +/-   ##
==========================================
+ Coverage   78.46%   78.60%   +0.13%     
==========================================
  Files         231      229       -2     
  Lines        8747     8715      -32     
==========================================
- Hits         6863     6850      -13     
+ Misses       1884     1865      -19     
Impacted Files Coverage Δ
...es/lang/codegen/src/generator/as_dependency/mod.rs 100.00% <ø> (+33.33%) ⬆️
crates/lang/codegen/src/generator/dispatch.rs 94.49% <ø> (-0.03%) ⬇️
crates/lang/codegen/src/generator/metadata.rs 97.36% <ø> (-0.03%) ⬇️
crates/lang/codegen/src/generator/mod.rs 100.00% <ø> (ø)
crates/lang/ir/src/ast/attr_args.rs 82.60% <ø> (ø)
crates/lang/ir/src/ir/contract.rs 100.00% <ø> (ø)
crates/lang/macro/src/lib.rs 100.00% <ø> (ø)
crates/lang/src/env_access.rs 12.00% <ø> (ø)
crates/lang/ir/src/ir/config.rs 96.49% <100.00%> (+0.96%) ⬆️
...ates/storage/src/collections/hashmap/fuzz_tests.rs 100.00% <0.00%> (+4.25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 776df42...62cb20e. Read the comment docs.

Copy link
Collaborator

@ascjones ascjones left a comment

Choose a reason for hiding this comment

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

LGTM

@HCastano HCastano merged commit 6659e9c into master Mar 9, 2022
@HCastano HCastano deleted the hc-remove-compile-as-dependency branch March 9, 2022 17:11
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.

4 participants