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

Refactor the Configuration #2248

Merged
merged 1 commit into from Mar 12, 2019

Conversation

@sebtomba
Copy link
Collaborator

commented Mar 8, 2019

Overview

Refactor Configuration. Remove the Task effect. Make logging of configuration information part of the node program.

JIRA ticket:

https://rchain.atlassian.net/browse/RCHAIN-3028

Please make sure that this PR:

@sebtomba sebtomba requested review from dzajkowski and rabbitonweb Mar 8, 2019

@sebtomba

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 9, 2019

bors try

bors bot added a commit that referenced this pull request Mar 9, 2019

@bors

This comment has been minimized.

Copy link
Contributor

commented Mar 9, 2019

case Left(t) =>
System.err.println(s"Can't build the configuration: ${t.getMessage}")
System.exit(1)
case _ =>

This comment has been minimized.

Copy link
@KentShikama

KentShikama Mar 12, 2019

Collaborator

Why not return configuration here

case Right(configuration) => configuration.get

This comment has been minimized.

Copy link
@sebtomba

sebtomba Mar 12, 2019

Author Collaborator

@KentShikama Because System.exit() is of type Unit. The type of this function is Config. So the code wouldn't compile.

command
)
private def loadConfigFile(configFile: Path): Config = {
val configE = Try(ConfigFactory.parseFile(configFile.toFile)).toEither

This comment has been minimized.

Copy link
@dzajkowski

dzajkowski Mar 12, 2019

Collaborator

E? as in 2.7182818284590452353602874713527...?

@sebtomba

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 12, 2019

bors r+

1 similar comment
@ArturGajowy

This comment has been minimized.

Copy link
Collaborator

commented Mar 12, 2019

bors r+

bors bot added a commit that referenced this pull request Mar 12, 2019

Merge #2248
2248: Refactor the Configuration r=ArturGajowy a=sebtomba



Co-authored-by: Sebastian Bach <sebastian.bach@rchain.coop>
@bors

This comment has been minimized.

Copy link
Contributor

commented Mar 12, 2019

@bors bors bot merged commit f1386ef into rchain:dev Mar 12, 2019

2 checks passed

bors Build succeeded
Details
continuous-integration/drone/pr the build was successful
Details

@sebtomba sebtomba deleted the sebtomba:RCHAIN-3028-undefined-rnode-log branch Mar 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.