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

dbSta: Add -module option to report_cell_usage #6562

Closed

Conversation

bangqixu
Copy link

As discussed before, we will introduce another few options to report_cell_usage. As a prerequisite, we need to add a "-module" option to the current report_cell_usage.

set modinst [[ord::get_db_block] findModInst $args]
if { $modinst == "NULL" } {
sta_error 1002 "Unable to find $args"
if { [info exists keys(-module)] } {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This change does not appear to be backwards compatible, can you please add a test or revert one of the tests to ensure backwards compatibility

Copy link
Author

Choose a reason for hiding this comment

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

It is true that this is not backward compatible. When I was discussing with @maliberty in a previous pull request, he suggested introducing such an option and backward compatibility did not seem to be a concern. See #6469 (comment)

Copy link
Collaborator

Choose a reason for hiding this comment

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

#6469 (comment)

Since I rely on the current API I would prefer maintaining backwards compatibility (you can add a deprecation warning if you would like)

Copy link
Author

Choose a reason for hiding this comment

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

How can I add a new option while keeping backward compatibility? For example, if I want to add "-format" and "-file" options, is it doable while keeping backward compatibility? Currently the command assumes there is only one option (not flag) that refers to the target module.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The flags are handled separately from the positional arguments, so adding new arguments doesn't have to change anything else.

Copy link
Author

@bangqixu bangqixu Jan 20, 2025

Choose a reason for hiding this comment

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

I think you might misunderstand my comment. I am saying that the module seems to be an option to me, and I want to add two more. It would be weird that some options have keys while some do not...

@bangqixu bangqixu requested a review from gadfort January 21, 2025 18:08
@bangqixu
Copy link
Author

bangqixu commented Jan 21, 2025

@maliberty can you help chime in here? It would be good if you and @gadfort can reach a consensus before I make further changes.

@bangqixu bangqixu requested a review from maliberty January 22, 2025 01:37
@bangqixu
Copy link
Author

@maliberty can you help chime in here? It would be good if you and @gadfort can reach a consensus before I make further changes.

Have you got a chance to discuss this? Thanks.

@bangqixu
Copy link
Author

Had discussion with @QuantamHD and I didn't know that $args is whatever is not matched. I will add "-module" then.

@maliberty
Copy link
Member

Had discussion with @QuantamHD and I didn't know that $args is whatever is not matched. I will add "-module" then.

It sounds like you have a next step then. Let me know when you are ready for a next review.

Btw, you'll need to fix the DCO before this can be merged.

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@bangqixu
Copy link
Author

Had discussion with @QuantamHD and I didn't know that $args is whatever is not matched. I will add "-module" then.

It sounds like you have a next step then. Let me know when you are ready for a next review.

Btw, you'll need to fix the DCO before this can be merged.

Will do. Thank you!

@bangqixu bangqixu marked this pull request as draft January 25, 2025 07:15
@bangqixu bangqixu closed this Feb 19, 2025
@bangqixu bangqixu deleted the report_cell_usage branch February 19, 2025 09:14
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.

3 participants