mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
Remove Deno.build.args feature (#2728)
This is a minor feature which complicates the build signifigantly. Removing to ease refactoring the build system: https://github.com/denoland/deno/issues/2608
This commit is contained in:
parent
ddee2dff14
commit
a517513182
5 changed files with 2 additions and 38 deletions
|
@ -247,10 +247,6 @@ bundle("main_bundle") {
|
|||
deps = [
|
||||
":deno_runtime_declaration",
|
||||
":msg_ts",
|
||||
":write_gn_args",
|
||||
]
|
||||
data = [
|
||||
"$target_gen_dir/gn_args.txt",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -260,10 +256,6 @@ bundle("compiler_bundle") {
|
|||
deps = [
|
||||
":deno_runtime_declaration",
|
||||
":msg_ts",
|
||||
":write_gn_args",
|
||||
]
|
||||
data = [
|
||||
"$target_gen_dir/gn_args.txt",
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -12,9 +12,6 @@ export interface BuildInfo {
|
|||
|
||||
/** The operating system. */
|
||||
os: OperatingSystem;
|
||||
|
||||
/** The arguments passed to GN during build. See `gn help buildargs`. */
|
||||
args: string;
|
||||
}
|
||||
|
||||
// 'build' is injected by rollup.config.js at compile time.
|
||||
|
@ -23,8 +20,7 @@ export const build: BuildInfo = {
|
|||
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
||||
arch: `ROLLUP_REPLACE_ARCH` as any,
|
||||
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
||||
os: `ROLLUP_REPLACE_OS` as any,
|
||||
args: `ROLLUP_REPLACE_GN_ARGS`
|
||||
os: `ROLLUP_REPLACE_OS` as any
|
||||
};
|
||||
|
||||
// TODO(kevinkassimo): deprecate Deno.platform
|
||||
|
|
|
@ -8,7 +8,3 @@ test(function buildInfo(): void {
|
|||
assert(arch === "x64");
|
||||
assert(os === "mac" || os === "win" || os === "linux");
|
||||
});
|
||||
|
||||
test(function buildGnArgs(): void {
|
||||
assert(Deno.build.args.length > 100);
|
||||
});
|
||||
|
|
|
@ -18,7 +18,6 @@ const typescriptPath = path.resolve(
|
|||
__dirname,
|
||||
"third_party/node_modules/typescript/lib/typescript.js"
|
||||
);
|
||||
const gnArgs = fs.readFileSync("gen/cli/gn_args.txt", "utf-8").trim();
|
||||
|
||||
// We will allow generated modules to be resolvable by TypeScript based on
|
||||
// the current build path
|
||||
|
@ -190,8 +189,7 @@ export default function makeConfig(commandOptions) {
|
|||
replace({
|
||||
ROLLUP_REPLACE_TS_VERSION: typescript.version,
|
||||
ROLLUP_REPLACE_ARCH: archNodeToDeno[process.arch],
|
||||
ROLLUP_REPLACE_OS: osNodeToDeno[process.platform],
|
||||
ROLLUP_REPLACE_GN_ARGS: gnArgs
|
||||
ROLLUP_REPLACE_OS: osNodeToDeno[process.platform]
|
||||
}),
|
||||
|
||||
// would prefer to use `rollup-plugin-virtual` to inject the empty module, but there
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
||||
import os
|
||||
import sys
|
||||
import third_party
|
||||
from util import run_output, build_path
|
||||
|
||||
out_filename = sys.argv[1]
|
||||
|
||||
args_list = run_output([
|
||||
third_party.gn_path, "args",
|
||||
build_path(), "--list", "--short", "--overrides-only"
|
||||
],
|
||||
quiet=True,
|
||||
env=third_party.google_env(),
|
||||
exit_on_fail=True).out
|
||||
|
||||
with open(out_filename, "w") as f:
|
||||
f.write(args_list)
|
Loading…
Add table
Reference in a new issue