-
Notifications
You must be signed in to change notification settings - Fork 105
fixes #180 : Enable syntax highlight to all platform #352
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
Cargo.toml
Outdated
optional = true | ||
default-features = false | ||
default-features = true |
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.
Is there a reason you are enabling the default features of syntect
?
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 admit it was kind of trials and errors here ^^' Not sure this one is needed.
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.
Thanks
Cargo.toml
Outdated
dev = [] | ||
default = ["syntax-highlight"] | ||
unstable = ["syntax-highlight"] | ||
dev = ["syntax-highlight"] |
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.
Why specify it in dev
and unstable
? default
should 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.
I didn't test with only default
, I test now :)
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.
Thanks
Cargo.toml
Outdated
default = [] | ||
unstable = [] | ||
dev = [] | ||
default = ["syntax-highlight"] |
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.
The CI should do a test build with default features disabled.
Also, the CI should no longer explicitly call out syntax-highlight
if its enabled by default.
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.
Oh, I forgot to edit the CI scripts, going right now :)
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.
Oh, missed the deploy script. Thanks for getting that. So just .travis.yml and appveyor.yml left?
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.
appveyor has no mention of the feature, I've changed travis :)
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.
appveyor has no mention of the feature, I've changed travis :)
My concern is with us accidentally breaking the no-default build.
The CI should do a test build with default features disabled.
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.
hm, I don't know much about appveyor yet, what do you mean?
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.
This is a Cargo feature and not an appveyor vs travis thing.
syntax-highlight
is a default feature, meaning cargo will auto-add it to the build when calling cargo build
. Users can disable this though, with --no-default-features
. We should make sure we don't break the build when no features are enabled.
So its just a matter of adding to both CIs
cargo test --no-default-features
.
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 see! :D I will add this after fixing appveyor :)
Thanks for owning this! |
Shall we keep the gnu target in appveyor? |
appveyor.yml
Outdated
@@ -22,6 +22,7 @@ environment: | |||
install: | |||
- ps: >- | |||
$Env:PATH += ';C:\msys64\usr\bin' | |||
- if "%TARGET%" == "x86_64-pc-windows-msvc" call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64 |
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.
You'll probably need to copy the rest of the setup for this from gutenberg
https://github.com/Keats/gutenberg/blob/master/appveyor.yml
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.
yeah, I'm trying to figure out what's wrong ^^ bear with me, it will be a git mess in the end x)
I don't get why appveyor is failing, cargo test runs perfectly fine on my computer :( |
It seems like you made it the furthest when you had |
with |
How come |
Hm, it did failed but I think I forgot the call to the batch file… ^^' it works so I put back the --target |
the |
My guess is that its something to do with the tempdir. I'd recommend
|
Forgot to respond to this This goes back to #99 for which I have no clue how important that target is within the rust ecosystem. Is there a reason you disabled it besides faster iteration? |
how do we disable travis? |
One option is to rename the file. |
Ok I found what's going on: passing I'm going to add an instruction in |
Travis failed here because of https://travis-ci.org/cobalt-org/cobalt.rs/jobs/324590284#L578 (error while downloading rust) It should work. How do we force a rebuild? |
Alternatively, we could use https://docs.rs/assert_cli/0.5.4/assert_cli/struct.Assert.html#method.main_binary |
appveyor.yml
Outdated
@@ -9,29 +11,39 @@ environment: | |||
|
|||
matrix: | |||
# Stable channel | |||
- TARGET: x86_64-pc-windows-gnu | |||
#- TARGET: x86_64-pc-windows-gnu |
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.
Whats the status of re-enabling this?
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.
Is does not compile, failing on miniz
Things remaining
And then once all looks good on that, cleaning up commits. |
|
main_binary is feature in
grumble Ok. |
replacing all
I don't get it, it should do the exact same thing. |
Huh, didn't realize See more info at the issue I created on assert_cli: assert-rs/assert_cli#79 |
Ok, so that assert_cli issue will probably not be resolved in time to unblock this issue. The main care abouts: people can easily run the tests on their own (no extra steps) and the CI provides value.
The original solution fails because it requires copying the binary first, even outside of the Another idea I have is that instead of |
I guess the shorthand would also work: |
appveyor.yml
Outdated
@@ -1,6 +1,8 @@ | |||
# Based on the "trust" template v0.1.1 | |||
# https://github.com/japaric/trust/tree/v0.1.1 | |||
|
|||
os: Visual Studio 2015 | |||
|
|||
environment: | |||
global: | |||
RUST_VERSION: stable |
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.
This is dead code now, please remove it
:o everything passes! need to clean up commits now |
SIGKILL on a compilation? https://travis-ci.org/cobalt-org/cobalt.rs/jobs/325410957#L796 I've put back |
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.
Looks like the last of it!
appveyor.yml
Outdated
- TARGET: i686-pc-windows-msvc | ||
CHANNEL: stable | ||
#- TARGET: x86_64-pc-windows-gnu | ||
# CHANNEL: stable |
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 we're not supporting gnu, we should remove it (Rather than leave it commented out) and give a reason in the commit message.
appveyor.yml
Outdated
#- TARGET: x86_64-pc-windows-msvc | ||
# CHANNEL: beta | ||
# TOOLCHAIN: msvc | ||
# PLATFORM: x86_64 |
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.
These targets are still commented out.
I don't get this error: https://ci.appveyor.com/project/johannhof/cobalt-rs/build/1.0.571/job/ptn77qeecg26q01i#L972 this happens time to time without apparent reason :-/ |
Whats weird is this doesn't fail as often on other builds. |
and now it on x86_64 instead on i686… (╯°□°)╯︵ ┻━┻ |
rust-lang/cargo#4655 seems that we can't do anything about it? Maybe adding syntax-highlight makes the build consume more RAM? |
appveyor.yml
Outdated
@@ -29,6 +29,7 @@ install: | |||
- if "%TOOLCHAIN%" == "msvc" if "%PLATFORM%" == "x86_64" "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 | |||
- if "%TOOLCHAIN%" == "msvc" if "%PLATFORM%" == "x86_64" call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64 | |||
- if "%TOOLCHAIN%" == "msys" set PATH=C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin;%PATH% | |||
- set MSBUILD_NODE_CONNECTION_TIMEOUT=0 |
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.
Should this instead be under environment: global:
?
Now I'm trying to weigh out dropping 32-bit support. The main use case of keeping it afaik is MS's new x86 on ARM stuff which is 32-bit only. Unsure if we'd be able to cross compile to it at some point. |
I agree to get rid of 32bits build, I'll try that asap, holidays are finished… |
|
If the build succeeds, feel free to squash the commits, documenting in them why you removed what you did, and let me know so I can merge this. |
https://ci.appveyor.com/project/tak1n/cobalt-rs/build/1.0.587/job/cw095bwrnbsdop0x#L976 I don't know what to do about this. |
We're still getting sporadic failures? This is not fun. |
I've asked reddit for help. |
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.
Looking great! Good job on seeing this through to getting it to work!
I left some comments in the appeyvor file. I'm unsure how much of these things are vestiges of previous attempts vs things we need
- if [%APPVEYOR_REPO_TAG%]==[false] ( cargo test --verbose ) | ||
- if [%APPVEYOR_REPO_TAG%]==[false] ( cargo +%CHANNEL%-%TARGET% build ) | ||
- if [%APPVEYOR_REPO_TAG%]==[false] ( cargo +%CHANNEL%-%TARGET% test ) | ||
- if [%APPVEYOR_REPO_TAG%]==[false] ( cargo +%CHANNEL%-%TARGET% build --no-default-features ) |
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.
Do these still need to be build
instead of check
?
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.
As said on gitter: because of natives C/C++ libs we need the build as check
doesn't support them yet.
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.
The annoying thing is that this doesn't seem to be a problem on Linux :(
appveyor.yml
Outdated
# Beta channel | ||
- TARGET: x86_64-pc-windows-msvc | ||
CHANNEL: beta | ||
TOOLCHAIN: msvc | ||
PLATFORM: x86_64 |
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.
What is PLATFORM
?
Should we set it globally?
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.
Good catch, it was used in the install
part to call the correct config .bat
file according to i686 vs x86_64. To be deleted :)
appveyor.yml
Outdated
CRATE_NAME: cobalt | ||
APPVEYOR_CACHE_SKIP_RESTORE: true | ||
MSBUILD_NODE_CONNECTION_TIMEOUT: 0 |
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.
What value does this give us?
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.
This was one of the workaround for the PDB issue, I'll try without it :)
- cargo check --no-default-features --verbose | ||
- cargo test --no-default-features --verbose | ||
- cargo check --verbose --features "sass" | ||
- cargo test --verbose --features "sass" |
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.
At some point we should make it so different feature combinations run as different jobs so they can run in parallel rather than series.
Granted that can get messy, particularly when we already have problems with our rustfmt and clippy jobs (see #305)
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.
Is this possible with travis?
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.
Yup, we just define more jobs in the matrix with a different variable set to control what happens in the job, maybe a FEATURE
variable that is --feature "sass"
vs --no-default-features
.
Not something to include in this because it'd require a lot more experimenting and we shouldn't hold this up :)
Sweet! Squash the commits and I'll get this merged! Thanks for all your effort on this one. Its been long and frustrating. I'm glad this didn't burn you out. Side projects should reinvigorate us and not tear us down. |
- Remove windows-gnu target, support of Windows only through MSVC - Remove 32 bits support - Switch to Visual Studio 2017 to avoid PBD error Remove uneeded variables
No description provided.