-
Notifications
You must be signed in to change notification settings - Fork 75
Etcm 52 make sure mantis works on windows #671
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
Conversation
8ba58a3
to
661d333
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both running Mantis from sbt dist
or sbt run
worked on my machine! (it's a linux machine)
@@ -510,7 +510,7 @@ trait GenesisDataLoaderBuilder { | |||
|
|||
trait SecureRandomBuilder { | |||
lazy val secureRandom: SecureRandom = | |||
Config.secureRandomAlgo.map(SecureRandom.getInstance).getOrElse(new SecureRandom()) | |||
Config.secureRandomAlgo.flatMap(name => Try(SecureRandom.getInstance(name)).toOption).getOrElse(new SecureRandom()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this hide the fact that the selected algorithm is available and other one is instead being used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I add logging about algorithm non available, will it be sufficient?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, given our current handling of config errors I think that with logging with error will be enough here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had run mantis on macos, from pre-exsiting database and it seems to work fine. @kapke did you check it on windows ?
I did, whole PR was prepared on Windows machine |
6a08ed2
to
811f3d7
Compare
952a4f9
to
02510ad
Compare
02510ad
to
f270dac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
.\\ //.
. \ \ / /.
.\ ,\ /` /,.-
-. \ /'/ / .
` - `-' \ -
'. /.\`
- .-
:`//.'
.`.'
.' BP
Description
This PR fixes issues found when trying to run Mantis on Windows, that is:
.bat
filesSecureRandom
instance is obtainedTesting
All tests,
sbt dist
and syncing from both sbt and dist package should work