mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 23:34:47 -05:00
Update rust to 1.38.0 (#3030)
This commit is contained in:
parent
e6e7977199
commit
f7bbd71e21
8 changed files with 23 additions and 28 deletions
|
@ -13,7 +13,7 @@ environment:
|
||||||
DENO_BUILD_PATH: $(APPVEYOR_BUILD_FOLDER)\target\release
|
DENO_BUILD_PATH: $(APPVEYOR_BUILD_FOLDER)\target\release
|
||||||
DENO_THIRD_PARTY_PATH: $(APPVEYOR_BUILD_FOLDER)\third_party
|
DENO_THIRD_PARTY_PATH: $(APPVEYOR_BUILD_FOLDER)\third_party
|
||||||
RELEASE_ARTIFACT: deno_win_x64.zip
|
RELEASE_ARTIFACT: deno_win_x64.zip
|
||||||
RUST_VERSION: 1.37.0
|
RUST_VERSION: 1.38.0
|
||||||
RUST_DIR: $(USERPROFILE)\rust-$(RUST_VERSION)
|
RUST_DIR: $(USERPROFILE)\rust-$(RUST_VERSION)
|
||||||
CARGO_HOME: $(RUST_DIR)\cargo
|
CARGO_HOME: $(RUST_DIR)\cargo
|
||||||
RUSTUP_HOME: $(RUST_DIR)\rustup
|
RUSTUP_HOME: $(RUST_DIR)\rustup
|
||||||
|
|
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -28,7 +28,7 @@ jobs:
|
||||||
- name: Install rust
|
- name: Install rust
|
||||||
uses: hecrj/setup-rust-action@v1
|
uses: hecrj/setup-rust-action@v1
|
||||||
with:
|
with:
|
||||||
rust-version: "1.37.0"
|
rust-version: "1.38.0"
|
||||||
|
|
||||||
- name: Install python
|
- name: Install python
|
||||||
uses: actions/setup-python@v1
|
uses: actions/setup-python@v1
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
sudo: false
|
sudo: false
|
||||||
language: rust
|
language: rust
|
||||||
rust:
|
rust:
|
||||||
- 1.37.0
|
- 1.38.0
|
||||||
git:
|
git:
|
||||||
depth: 1
|
depth: 1
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -682,8 +682,8 @@ fn parse_script_args(
|
||||||
let matches =
|
let matches =
|
||||||
cli_app.get_matches_from_safe(vec!["deno".to_string(), arg.to_string()]);
|
cli_app.get_matches_from_safe(vec!["deno".to_string(), arg.to_string()]);
|
||||||
|
|
||||||
if matches.is_ok() {
|
if let Ok(m) = matches {
|
||||||
flags = parse_flags(&matches.unwrap(), Some(flags));
|
flags = parse_flags(&m, Some(flags));
|
||||||
} else {
|
} else {
|
||||||
argv.push(arg.to_string());
|
argv.push(arg.to_string());
|
||||||
}
|
}
|
||||||
|
|
|
@ -539,13 +539,7 @@ pub fn get_file(rid: ResourceId) -> Result<std::fs::File, ErrBox> {
|
||||||
// Insert the entry back with the same rid.
|
// Insert the entry back with the same rid.
|
||||||
table.insert(rid, Repr::FsFile(tokio_fs::File::from_std(std_file)));
|
table.insert(rid, Repr::FsFile(tokio_fs::File::from_std(std_file)));
|
||||||
|
|
||||||
if maybe_std_file_copy.is_err() {
|
maybe_std_file_copy.map_err(ErrBox::from)
|
||||||
return Err(ErrBox::from(maybe_std_file_copy.unwrap_err()));
|
|
||||||
}
|
|
||||||
|
|
||||||
let std_file_copy = maybe_std_file_copy.unwrap();
|
|
||||||
|
|
||||||
Ok(std_file_copy)
|
|
||||||
}
|
}
|
||||||
_ => Err(bad_resource()),
|
_ => Err(bad_resource()),
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,8 +110,8 @@ pub fn apply_source_map<G: SourceMapGetter>(
|
||||||
// source file map.
|
// source file map.
|
||||||
let end_column = match v8_exception.end_column {
|
let end_column = match v8_exception.end_column {
|
||||||
Some(ec) => {
|
Some(ec) => {
|
||||||
if start_column.is_some() {
|
if let Some(sc) = start_column {
|
||||||
Some(ec - (v8_exception.start_column.unwrap() - start_column.unwrap()))
|
Some(ec - (v8_exception.start_column.unwrap() - sc))
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
@ -120,16 +120,17 @@ pub fn apply_source_map<G: SourceMapGetter>(
|
||||||
};
|
};
|
||||||
// if there is a source line that we might be different in the source file, we
|
// if there is a source line that we might be different in the source file, we
|
||||||
// will go fetch it from the getter
|
// will go fetch it from the getter
|
||||||
let source_line = if v8_exception.source_line.is_some()
|
let source_line = match line_number {
|
||||||
&& script_resource_name.is_some()
|
Some(ln)
|
||||||
&& line_number.is_some()
|
if v8_exception.source_line.is_some()
|
||||||
|
&& script_resource_name.is_some() =>
|
||||||
{
|
{
|
||||||
getter.get_source_line(
|
getter.get_source_line(
|
||||||
&v8_exception.script_resource_name.clone().unwrap(),
|
&v8_exception.script_resource_name.clone().unwrap(),
|
||||||
line_number.unwrap() as usize,
|
ln as usize,
|
||||||
)
|
)
|
||||||
} else {
|
}
|
||||||
v8_exception.source_line.clone()
|
_ => v8_exception.source_line.clone(),
|
||||||
};
|
};
|
||||||
|
|
||||||
V8Exception {
|
V8Exception {
|
||||||
|
|
|
@ -171,8 +171,8 @@ impl Loader for ThreadSafeState {
|
||||||
if !is_main {
|
if !is_main {
|
||||||
if let Some(import_map) = &self.import_map {
|
if let Some(import_map) = &self.import_map {
|
||||||
let result = import_map.resolve(specifier, referrer)?;
|
let result = import_map.resolve(specifier, referrer)?;
|
||||||
if result.is_some() {
|
if let Some(r) = result {
|
||||||
return Ok(result.unwrap());
|
return Ok(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@ impl ModuleSpecifier {
|
||||||
|| specifier.starts_with("./")
|
|| specifier.starts_with("./")
|
||||||
|| specifier.starts_with("../")) =>
|
|| specifier.starts_with("../")) =>
|
||||||
{
|
{
|
||||||
Err(ImportPrefixMissing(specifier.to_string()))?
|
return Err(ImportPrefixMissing(specifier.to_string()))
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. Return the result of applying the URL parser to specifier with base
|
// 3. Return the result of applying the URL parser to specifier with base
|
||||||
|
@ -103,7 +103,7 @@ impl ModuleSpecifier {
|
||||||
// it being relative, always return the original error. We don't want to
|
// it being relative, always return the original error. We don't want to
|
||||||
// return `ImportPrefixMissing` or `InvalidBaseUrl` if the real
|
// return `ImportPrefixMissing` or `InvalidBaseUrl` if the real
|
||||||
// problem lies somewhere else.
|
// problem lies somewhere else.
|
||||||
Err(err) => Err(InvalidUrl(err))?,
|
Err(err) => return Err(InvalidUrl(err)),
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(ModuleSpecifier(url))
|
Ok(ModuleSpecifier(url))
|
||||||
|
|
Loading…
Reference in a new issue