-
Notifications
You must be signed in to change notification settings - Fork 7
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
Windows SPFS Build #829
Merged
Merged
Windows SPFS Build #829
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rydrman
force-pushed
the
windows-build
branch
3 times, most recently
from
August 4, 2023 01:26
876feed
to
4b089d3
Compare
rydrman
commented
Aug 4, 2023
Comment on lines
-229
to
+231
let display_total: String = if num_digits > DIGITS_LIMIT { | ||
format!("{total:5.4e}").replace('e', " x 10^") | ||
} else { | ||
// TODO: it would be nice to format these large numbers using | ||
// something like the num-format crate, but the bignum's | ||
// (rug::Integer) used to hold the large numbers in these | ||
// calculations would need to support or be wrapped to | ||
// implement num-format's required traits. | ||
total.to_string() | ||
}; | ||
use num_format::ToFormattedString; | ||
let display_total = total.to_formatted_string(&num_format::Locale::en); |
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.
Note this change, since BigUint does not support the scientific notation formatting (yet - see below), but it does support the use of the num-format
crate which was our plan anyway, it seems.
rydrman
force-pushed
the
windows-build
branch
2 times, most recently
from
August 4, 2023 01:37
9ea296a
to
b06bff1
Compare
Rug was not cross-platform Signed-off-by: Ryan Bottriell <[email protected]>
Signed-off-by: Ryan Bottriell <[email protected]>
Signed-off-by: Ryan Bottriell <[email protected]>
Signed-off-by: Ryan Bottriell <[email protected]>
rydrman
force-pushed
the
windows-build
branch
2 times, most recently
from
August 4, 2023 15:35
79c3687
to
97372e4
Compare
This allows spfs to build via cross, but produces a binary that will panic because of missing implementations. The goal at this point is to build for windows in CI to avoid any regressions moving forward as we work to add support. Signed-off-by: Ryan Bottriell <[email protected]>
jrray
approved these changes
Aug 4, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows spfs to build via
cross
, but produces a binary that will panic because of missing implementations. The goal at this point is to build for windows in CI to avoid any regressions moving forward as we work to add support and fill in the stubbed-out functionalityFor the most part, I've taken to adding
*_win.rs
modules alongside the existing unix ones with stub-functions. There's obviously a chance that the actual implementation differs and we do something else but this seemed like the best place to start in terms of getting the build to complete and clearly showing the main pieces that we need to work on adding implementations for.In terms of permissions, I've taken the same route as git which is to say that all files are committed with the same 644 permissions and we don't deal with permissions at all when rendering. We will need to likely do something about tracking executable bits and handling diffs in existing environments, but as far as I can tell there's no simple way to translate from the windows security model. We could look at the owner/current user and try to do a mapping but I'm not sure that there's a good reason to try.