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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request][move-compiler-v2] warn about compilation input files that seem to be redundant #13322

Open
brmataptos opened this issue May 17, 2024 · 1 comment
Labels
compiler-v2 enhancement New feature or request stale-exempt Prevents issues from being automatically marked and closed as stale

Comments

@brmataptos
Copy link
Contributor

馃殌 Feature Request

As discussed in #13216, we think there are certain cases where different or multiple versions of the same file may be found by move-package searches for Move compilation dependencies. It's not clear that this is feasible, but we should add a mechanism to check for redundant packages and/or very similar files (perhaps just identical file names, or last-level directory + filename) and warn about them during compilation, especially if an error occurs.

This could be accompanied by suggestions to run aptos move clean or move clean in dependency directories, or deleting build/ directories.

@brmataptos brmataptos added enhancement New feature or request compiler-v2 labels May 17, 2024
@sausagee sausagee added the stale-exempt Prevents issues from being automatically marked and closed as stale label May 20, 2024
@brmataptos
Copy link
Contributor Author

brmataptos commented May 20, 2024

Note that move_command_line_common::files::find_move_filenames is used to find source files recursively, given a list of package directories and/or move source files. The list of dependent packages should be handled differently when this was called, appending "/source" to any directory name so that files in other subdirs are not grabbed, such as test dirs that may contain a lot of unrelated files.

It is more awkward to do this in callers, since the list can have files (which should be kept unchanged) and directories (which should be modified for the case of deps), but this is an API change so maybe a separate function should be created.

I've spawned a new issue to deal with this: #13361, while leaving this one to track a feature which would be lower priority if we fix that one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler-v2 enhancement New feature or request stale-exempt Prevents issues from being automatically marked and closed as stale
Projects
Status: 馃啎 New
Development

No branches or pull requests

2 participants