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 wrong file name in error message #794

Merged
merged 1 commit into from
Jan 16, 2022
Merged

Conversation

dbrumann
Copy link
Collaborator

Removes fallback to old default file name, when specified config-file is not found. Subsequently, the file loader will throw the CouldNotReadFileException.php for the expected filename.

Fixes #789

@dbrumann dbrumann force-pushed the fix_789 branch 4 times, most recently from 5e3dac0 to 0fc431a Compare January 16, 2022 11:01
@dbrumann
Copy link
Collaborator Author

Assuming a project with the new depfile deptrac.yaml exists, this is now the output when running analyse with different options:

command legacy warning file warning
none no no
analyse deptrac.yaml yes, because we use the old depfile argument no
analyse depfile.yaml yes, because we use the old depfile argument File ".../depfile.yaml" cannot be read.
analyse --config-file=deptrac.yaml no no
analyse --config-file=depfile.yaml no File ".../depfile.yaml" cannot be read.

Assuming a project with the old depfile depfile.yaml exists, this is now the output when running analyse with different options:

command legacy warning file warning
none yes (because old filename of the default file) no
analyse deptrac.yaml yes, because we use the old depfile argument File ".../deptrac.yaml" cannot be read.
analyse depfile.yaml yes, because we use the old depfile argument no
analyse --config-file=deptrac.yaml no File ".../deptrac.yaml" cannot be read.
analyse --config-file=depfile.yaml no no

This check only looks for the used option and default filename, but does not look at the file content. We have checks for that as well, but the deprecation warnings might not be shown depending on the default error output settings. In other words, if you just change the filename from depfile.yaml to deptrac.yaml without making the structural changes (moving the parameters to the parameters section), the warning will disappear for now, but the command will fail once we remove the BC-layer.

@dbrumann dbrumann merged commit a3459f0 into qossmic:main Jan 16, 2022
@dbrumann dbrumann deleted the fix_789 branch January 16, 2022 12:46
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.

Wrong config file name in error
1 participant