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

fix: Don't depend on ansi_term in windows to make windows 7 work #778

Merged
merged 3 commits into from
Aug 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ branches:

matrix:
include:
- rust: nightly-2019-05-20
- rust: nightly-2019-08-30
- rust: beta
- rust: stable
env: ARCH=i686
Expand All @@ -35,7 +35,7 @@ matrix:
- BENCH_DEFAULT_FEATURES_CHECK=1
- TARGET=x86_64-unknown-linux-gnu

- rust: nightly-2019-05-20
- rust: nightly-2019-08-30
env: WASM=1

# Only for deployment
Expand Down
4 changes: 3 additions & 1 deletion repl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ gluon_codegen = { path = "../codegen", version = "0.12.0" } # GLUON
gluon_format = { version = "0.12.0", path = "../format" } # GLUON
gluon_doc = { version = "0.12.0", path = "../doc" } # GLUON

ansi_term = "0.12"
app_dirs = "1.0.0"
futures = "0.1.11"
futures-cpupool = "0.1"
Expand All @@ -48,6 +47,9 @@ codespan-reporting = "0.3"
serde = "1"
serde_derive = "1"

[target.'cfg(not(windows))'.dependencies]
ansi_term = "0.12"

[dev-dependencies]
pretty_assertions = "0.6"

Expand Down
7 changes: 5 additions & 2 deletions repl/src/repl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,12 @@ impl rustyline::highlight::Highlighter for Completer {

fn highlight_hint<'h>(&self, hint: &'h str) -> Cow<'h, str> {
// TODO Detect when windows supports ANSI escapes
if cfg!(windows) {
#[cfg(windows)]
{
Cow::Borrowed(hint)
} else {
}
#[cfg(not(windows))]
{
use ansi_term::Style;
Cow::Owned(Style::new().dimmed().paint(hint).to_string())
}
Expand Down
5 changes: 3 additions & 2 deletions scripts/install_sccache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ else
TARGET='x86_64-unknown-linux-musl'
fi

SCCACHE_VERSION="sccache-0.2.8-${TARGET}"
curl -L "https://github.com/mozilla/sccache/releases/download/0.2.8/$SCCACHE_VERSION.tar.gz" | tar -xvz
VERSION="0.2.10"
SCCACHE_VERSION="sccache-${VERSION}-${TARGET}"
curl -L "https://github.com/mozilla/sccache/releases/download/${VERSION}/$SCCACHE_VERSION.tar.gz" | tar -xvz
mv $SCCACHE_VERSION/sccache .
chmod +x ./sccache
mv ./sccache $HOME/bin/