Skip to content

Commit

Permalink
Merge #778
Browse files Browse the repository at this point in the history
778: fix: Don't depend on ansi_term in windows to make windows 7 work r=Marwes a=Marwes

Fixes #777

Co-authored-by: Markus Westerlind <[email protected]>
  • Loading branch information
bors[bot] and Marwes authored Aug 31, 2019
2 parents b910eea + 4f64230 commit 4f76ca6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
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/

0 comments on commit 4f76ca6

Please sign in to comment.