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

Get rid of the dirs dependency. #1577 #1584

Merged
merged 4 commits into from
Jul 1, 2022
Merged

Get rid of the dirs dependency. #1577 #1584

merged 4 commits into from
Jul 1, 2022

Conversation

tyshko5
Copy link
Contributor

@tyshko5 tyshko5 commented Jun 28, 2022

Summary of changes
Changes introduced in this pull request:

Reference issue to close (if applicable)

Closes #1577

Other information and links

forest/src/cli/config.rs Outdated Show resolved Hide resolved
forest/src/cli/config.rs Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jun 28, 2022

Codecov Report

Merging #1584 (cdc28f5) into main (827746a) will decrease coverage by 4.73%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##             main    #1584      +/-   ##
==========================================
- Coverage   34.22%   29.48%   -4.74%     
==========================================
  Files         209      193      -16     
  Lines       24034    21195    -2839     
==========================================
- Hits         8225     6250    -1975     
+ Misses      15809    14945     -864     
Impacted Files Coverage Δ
forest/src/daemon.rs 0.44% <0.00%> (+<0.01%) ⬆️
node/utils/src/lib.rs 78.12% <ø> (-1.88%) ⬇️
forest/src/cli/config.rs 100.00% <100.00%> (ø)
utils/bigint/src/bigint_ser.rs 44.82% <0.00%> (-36.59%) ⬇️
blockchain/message_pool/src/msgpool/utils.rs 53.57% <0.00%> (-7.15%) ⬇️
blockchain/beacon/src/drand.rs 32.77% <0.00%> (-0.28%) ⬇️
blockchain/message_pool/src/msgpool/msg_pool.rs 65.75% <0.00%> (-0.20%) ⬇️
blockchain/message_pool/src/msgpool/mod.rs 87.76% <0.00%> (-0.14%) ⬇️
crypto/src/errors.rs 0.00% <0.00%> (ø)
node/rpc-api/src/data_types.rs 0.00% <0.00%> (ø)
... and 33 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 827746a...cdc28f5. Read the comment docs.

Copy link
Contributor

@lemmih lemmih left a comment

Choose a reason for hiding this comment

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

Change data_dir to be a PathBuf and then it's all set.

@tyshko5 tyshko5 requested a review from lemmih June 29, 2022 08:25
forest/src/daemon.rs Outdated Show resolved Hide resolved
@tyshko5 tyshko5 requested a review from LesnyRumcajs June 30, 2022 11:51
@@ -34,9 +35,10 @@ pub struct Config {

impl Default for Config {
fn default() -> Self {
let dir = ProjectDirs::from("com", "ChainSafe", "Forest").expect("failed to find project directories, please set FOREST_CONFIG_PATH environment variable manually.");
Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally we would factor this out so we only have a single source of truth for the ProjectDirs. But that can wait until another PR.

@lemmih lemmih merged commit 82ddcaa into main Jul 1, 2022
@lemmih lemmih deleted the tyshko5/issue-1577 branch July 1, 2022 10:18
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.

Get rid of the dirs dependency.
4 participants