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 CLI option true defaults to enable negation #5582

Merged
merged 1 commit into from
Dec 4, 2022

Conversation

alnoki
Copy link
Contributor

@alnoki alnoki commented Nov 15, 2022

@wrwg @davidiw @gregnazario @alinush

Per #5581 , DocGen CLI options defaulting to true prohibit negation.


This change is Reviewable

Copy link
Contributor

@wrwg wrwg left a comment

Choose a reason for hiding this comment

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

Did you ensure that all existing instances of DocgenOptions still choose the same values as before?

@alnoki
Copy link
Contributor Author

alnoki commented Nov 15, 2022

Did you ensure that all existing instances of DocgenOptions still choose the same values as before?

@wrwg

Are you referring to instances in other files, like aptos-move/framework/src/aptos.rs? Here, I have not modified anything, so it looks like this:

build_options: BuildOptions {
                with_srcs,
                with_abis: true,
                with_source_maps: false,
                with_error_map: true,
                named_addresses: Default::default(),
                install_dir: None,
                with_docs: true,
                docgen_options: Some(DocgenOptions {
                    include_impl: true,
                    include_specs: true,
                    specs_inlined: false,
                    include_dep_diagram: false,
                    collapsed_sections: true,
                    landing_page_template: Some("doc_template/overview.md".to_string()),
                    references_file: Some("doc_template/references.md".to_string()),
                }),
            },

Would these also need to be updated?


Alternatively, if you could make it so the CLI accepts a negation modifier on an option that would rectify the problem too. The real issue here is that there seems to be no way in practice to negate the options that were defaulted to true, which I modified in the commit.

Is there something I'm missing here?

Comment on lines -18 to 20
/// Whether to include specifications in the generated documentation. Defaults to true.
#[clap(long, global = true)]
/// Whether to include specifications in the generated documentation. Defaults to false.
#[clap(long)]
pub include_specs: bool,
Copy link
Contributor

Choose a reason for hiding this comment

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

The other option is we can make it exclude_specs. This still lets it default to true, but allows for negation.

Copy link
Contributor

Choose a reason for hiding this comment

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

It is probably fine.

@wrwg
Copy link
Contributor

wrwg commented Nov 16, 2022

Did you ensure that all existing instances of DocgenOptions still choose the same values as before?

@wrwg

Are you referring to instances in other files, like aptos-move/framework/src/aptos.rs? Here, I have not modified anything, so it looks like this:

build_options: BuildOptions {
                with_srcs,
                with_abis: true,
                with_source_maps: false,
                with_error_map: true,
                named_addresses: Default::default(),
                install_dir: None,
                with_docs: true,
                docgen_options: Some(DocgenOptions {
                    include_impl: true,
                    include_specs: true,
                    specs_inlined: false,
                    include_dep_diagram: false,
                    collapsed_sections: true,
                    landing_page_template: Some("doc_template/overview.md".to_string()),
                    references_file: Some("doc_template/references.md".to_string()),
                }),
            },

Would these also need to be updated?

Alternatively, if you could make it so the CLI accepts a negation modifier on an option that would rectify the problem too. The real issue here is that there seems to be no way in practice to negate the options that were defaulted to true, which I modified in the commit.

Is there something I'm missing here?

Just want to be sure that there is no behavioral change but this case looks OK to me, so I think we are fine.

@davidiw davidiw enabled auto-merge (squash) December 3, 2022 23:07
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@wrwg @davidiw @gregnazario @alinush 

Per aptos-labs#5581 , DocGen CLI options defaulting to true prohibit negation.
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2022

✅ Forge suite land_blocking success on 911593435aa58a7b76f539fe4f09843deb40b262

performance benchmark with full nodes : 6601 TPS, 6018 ms latency, 8400 ms p99 latency,no expired txns
Test Ok

@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2022

✅ Forge suite compat success on testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> 911593435aa58a7b76f539fe4f09843deb40b262

Compatibility test results for testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> 911593435aa58a7b76f539fe4f09843deb40b262 (PR)
1. Check liveness of validators at old version: testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b
compatibility::simple-validator-upgrade::liveness-check : 7444 TPS, 5168 ms latency, 7500 ms p99 latency,no expired txns
2. Upgrading first Validator to new version: 911593435aa58a7b76f539fe4f09843deb40b262
compatibility::simple-validator-upgrade::single-validator-upgrade : 4581 TPS, 9073 ms latency, 11600 ms p99 latency,no expired txns
3. Upgrading rest of first batch to new version: 911593435aa58a7b76f539fe4f09843deb40b262
compatibility::simple-validator-upgrade::half-validator-upgrade : 4460 TPS, 8953 ms latency, 11800 ms p99 latency,no expired txns
4. upgrading second batch to new version: 911593435aa58a7b76f539fe4f09843deb40b262
compatibility::simple-validator-upgrade::rest-validator-upgrade : 6939 TPS, 5565 ms latency, 9800 ms p99 latency,no expired txns
5. check swarm health
Compatibility test for testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> 911593435aa58a7b76f539fe4f09843deb40b262 passed
Test Ok

@davidiw davidiw merged commit d085a3a into aptos-labs:main Dec 4, 2022
@Markuze Markuze mentioned this pull request Dec 5, 2022
areshand pushed a commit to areshand/aptos-core-1 that referenced this pull request Dec 18, 2022
@Markuze Markuze mentioned this pull request Dec 26, 2022
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