Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upfeat(Windows platform): Allow building on Windows Stable Rust #1560
Conversation
Signed-off-by: Ana Hobden <operator@hoverbear.org>
| @@ -14,6 +14,8 @@ scan_fmt = "0.2.3" | |||
| tracing = "0.1.2" | |||
| indexmap = {version = "1.0.2", features = ["serde-1"]} | |||
| flate2 = "1.0.6" | |||
| winapi = { version = "0.3.8", features = ["winioctl"] } | |||
This comment has been minimized.
This comment has been minimized.
LucioFranco
Jan 21, 2020
Member
I think we pullin winapi 0.2 via mio 0.6 to avoid a duplicate here for now, is it possible to use winapi 0.2? I don't think this should hurt compile times either since we already need to compile it.
This comment has been minimized.
This comment has been minimized.
Hoverbear
Jan 21, 2020
Author
Contributor
Fantastic, great catch. :) I'll verify this and make the change.
This comment has been minimized.
This comment has been minimized.
Hoverbear
Jan 21, 2020
•
Author
Contributor
Seems winapi 2.x doesn't have some variables like FSCTL_GET_REPARSE_POINT. :(
This comment has been minimized.
This comment has been minimized.
|
LGTM! cc @lukesteensen @a-rodin you both might be interested in this change. |
7f2e7df
to
ec4379f
Signed-off-by: Ana Hobden <operator@hoverbear.org>
Signed-off-by: Ana Hobden <operator@hoverbear.org>
Signed-off-by: Ana Hobden <operator@hoverbear.org>
This comment has been minimized.
This comment has been minimized.
|
I think 3388a74 is enough to get Windows on CI to use stable now. |
This comment has been minimized.
This comment has been minimized.
|
Hm, I'm not sure if this is a related failure: https://circleci.com/gh/timberio/vector/78014
|
This comment has been minimized.
This comment has been minimized.
|
I am similarly confused by: https://circleci.com/gh/timberio/vector/78008
|
This comment has been minimized.
This comment has been minimized.
I ran this check locally and it passed. Sometimes the CI instance turns out to be too slow, which makes this test fail. Restarting the job might help.
It is a known issue, see #1527. It is safe to ignore it for now as it is not related to the changes. |
This comment has been minimized.
This comment has been minimized.
|
I think this just needs a rebase/merge of master? |
This comment has been minimized.
This comment has been minimized.
|
Let's have a try. :) |
This comment has been minimized.
This comment has been minimized.
|
Just a note: we probably would need to update the instructions for building Vector on Windows to use stable Rust. These instructions can be updated by changing the template and running |
This comment has been minimized.
This comment has been minimized.
|
@Hoverbear would you mind doing what @a-rodin said and then we can merge? Thanks! |
This comment has been minimized.
This comment has been minimized.
|
Absolutely! |
This comment has been minimized.
This comment has been minimized.
|
@LucioFranco A final look over? |
|
LGTM! |
e3afda3
into
timberio:master
This comment has been minimized.
This comment has been minimized.
|
Nice work! |
Hoverbear commentedJan 21, 2020
Support building on Windows with
rustcstable.This PR fixes #1480 by importing a few pieces of stdlib code.
In #1480 @LucioFranco and I discussed some reasoning about why the code is here and not another module. In short: It's simpler! I'd be happy to make it a separate mod though.
The only usages were:
vector/lib/file-source/src/metadata_ext.rs
Lines 23 to 30 in b290ceb
Implementation notes
It was a small conundrum since
Metadatadoesn't have this information without the nightly feature. With that feature enabled this following code builds the datum which the functions we want read from:https://github.com/rust-lang/rust/blob/30ddb5a8c1e85916da0acdc665d6a16535a12dd6/src/libstd/sys/windows/fs.rs#L326-L351
So the easiest solution was to have the consumer code in
file_server.rsandfile_watcher.rswork with the file handle instead of the metadata, and then extend theFiletype.Caveats:
FIXMEtag to the file to make sure folks can know why it's there.