denoland / cargo_gn Goto Github PK
View Code? Open in Web Editor NEWCargo GN integration
Cargo GN integration
If gn fails, cargo_gn will not attempt to re-run it because the gn_out
directory has been created.
It should look for the presence of gn_out/build.ninja
instead.
See
Line 64 in da37d12
Trying to build rusty_v8 as dependency of my project, "Regenerating ninja files" phase fails because --root parameter points to non-existent directory. I suppose the problem arises because the package source is part of a workspace and therefore the target folder lives inside parent.
To make it work, I applied the following patch:
diff --git a/src/lib.rs b/src/lib.rs
index 8ce576b..b73e925 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -30,7 +30,7 @@ fn get_dirs(manifest_dir: Option<&str>) -> Dirs {
.to_owned();
let root = match manifest_dir {
- Some(s) => env::current_dir().unwrap().join(s),
+ Some(s) => PathBuf::from(s),
None => env::var("CARGO_MANIFEST_DIR").map(PathBuf::from).unwrap(),
};
In order to successfully run GN on windows, DEPOT_TOOLS_WIN_TOOLCHAIN=0
and other environment variables need to be set.
However, maybe_gen()
uses the default environment, hence it can't work on windows.
The reason it works on appveyor is probably because the necessary environment variables are also specified in .appveyor.yml
, but this is not usable for a normal development workflow.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.