Skip to content

Commit

Permalink
Remove Deno.build.args feature
Browse files Browse the repository at this point in the history
This is a minor feature which complicates the build signifigantly.
Removing to ease refactoring the build system:
denoland#2608
  • Loading branch information
ry committed Jul 11, 2019
1 parent 4c266ff commit 49261c3
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 38 deletions.
8 changes: 0 additions & 8 deletions cli/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,6 @@ bundle("main_bundle") {
deps = [
":deno_runtime_declaration",
":msg_ts",
":write_gn_args",
]
data = [
"$target_gen_dir/gn_args.txt",
]
}

Expand All @@ -257,10 +253,6 @@ bundle("compiler_bundle") {
deps = [
":deno_runtime_declaration",
":msg_ts",
":write_gn_args",
]
data = [
"$target_gen_dir/gn_args.txt",
]
}

Expand Down
6 changes: 1 addition & 5 deletions js/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
4 changes: 0 additions & 4 deletions js/build_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
4 changes: 1 addition & 3 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
18 changes: 0 additions & 18 deletions tools/write_gn_args.py

This file was deleted.

0 comments on commit 49261c3

Please sign in to comment.