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: webdav/forget: correctly use application config #1241

Merged
merged 4 commits into from
Sep 18, 2024

Conversation

nardoor
Copy link
Contributor

@nardoor nardoor commented Sep 17, 2024

The inner_run implementation used self
to read its config when it should use RUSTIC_APP.config().

Some might say this is counterintuitive.
fixes #1163
also now correctly respects having prune = true in the config profile.

The `inner_run` implementation used `self`
to read its config when it should use `RUSTIC_APP.config()`.

Some might say this is counterintuitive.
@nardoor
Copy link
Contributor Author

nardoor commented Sep 17, 2024

@aawsome @simonsan
The logic that caused this bug is very counterintuitive to me.
This bug happened once, and nothing in the type system (compile time) will prevent anyone to re-implement it later on.

I wish abscissa_core had some way of mutating structures like WebdavCmd instead of having the truthful config in the RUSTIC_APP static.

@aawsome aawsome changed the title fix(webdav): correctly use application config fix: webdav/forget: correctly use application config Sep 17, 2024
In commands that have configurations from
the ENV and the TOML (on top of CLI),
a confusion between RUSTIC_APP.config()
and &self (see `inner_run` impls) could
lead to parts of the user configured options
to be ignored.

For now we warn about this in the code.
But some design change should be decided
in order to avoid these risks in the future.
@nardoor nardoor self-assigned this Sep 17, 2024
aawsome
aawsome previously approved these changes Sep 18, 2024
src/commands/forget.rs Outdated Show resolved Hide resolved
src/commands/forget.rs Outdated Show resolved Hide resolved
src/commands/forget.rs Outdated Show resolved Hide resolved
@simonsan simonsan added this pull request to the merge queue Sep 18, 2024
Merged via the queue into main with commit b865901 Sep 18, 2024
25 checks passed
@simonsan simonsan deleted the fix/webdav_configuration_bug branch September 18, 2024 14:54
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.

WebDAV configuration isn't working in windows
3 participants