Code Monkey home page Code Monkey logo

Comments (13)

alexeagle avatar alexeagle commented on May 6, 2024

Looks like a bug in bazel, do you have a few minutes to make a minimal repro for them?

from angular-bazel-example.

gregbown avatar gregbown commented on May 6, 2024

Sure but unclear where to create such a repro? Please advise
Below is my environment info
Windows 10 Pro, Version 1703, OS Build 15063.540
Yarn 1.0.1
Node 6.10.2
npm 4.0.2
Python 3.6.2
Java version "1.8.0_144"
Java SE Runtime Environment (build 1.8.0_144-b01)
Bazel version Build label: 0.5.4 Build target: bazel-out/msvc_x64-fastbuild/bin/src... Build time: Fri Aug 25 09:59:45 2017 (1503655185) Build timestamp: 1503655185 Build timestamp as int: 1503655185
Bazel was installed with the binary download version without jdk as jdk is already set up on my system.
I was able to run the hello world examples in the bazel repo; Java, Python and C++.
I set up an environment path so I can access it anywhere.

Thanks for the prompt response Alex

from angular-bazel-example.

alexeagle avatar alexeagle commented on May 6, 2024

from angular-bazel-example.

gregbown avatar gregbown commented on May 6, 2024

My apologies Alex, I was incorrect in focusing on the one aspect of the path.
I have posted a bug on the bazel issues here

from angular-bazel-example.

alexeagle avatar alexeagle commented on May 6, 2024

Oh, sorry, I think you are just missing
bazelbuild/rules_nodejs@defc644
can you upgrade rules_nodejs to 0.1.1 ?

from angular-bazel-example.

gregbown avatar gregbown commented on May 6, 2024

Thanks Alex. It made it a little farther this time. This may be a yarn - bazel integration issue?
I cant tell why it barks that yarn.sh is not a recognized command?
`C:\Users\gbown\Documents\bazel-angular\angular-bazel-example>bazel run @yarn//:yarn
INFO: Found 1 target...
Target @yarn//:yarn.sh up-to-date (nothing to build)
INFO: Elapsed time: 55.942s, Critical Path: 0.02s

INFO: Running command line: C:/users/gbown/appdata/local/temp/_bazel_gbown/afpn2gxi/external/yarn/yarn.sh
'"C:/users/gbown/appdata/local/temp/_bazel_gbown/afpn2gxi/external/yarn/yarn.sh"' is not recognized as an internal or external command,
operable program or batch file.
ERROR: Non-zero return code '1' from command: Process exited with status 1.`

Double checked my yarn install. Note I have both the msi installer version and a global nodejs version and they are both 1.0.2
C:\Windows\System32>yarn --version 1.0.2

Also checked my environment path for windows:
C:\Program Files (x86)\Yarn\bin
Also tried:
C:\Program Files (x86)\Yarn\bin\
This post recommends an extra slash
Either way my system obviously can access it as shown by yarn --version

from angular-bazel-example.

alexeagle avatar alexeagle commented on May 6, 2024

hmm, you seem to be missing
bazelbuild/rules_nodejs@7c219b2
it's my fault because I didn't label a release after that!

Just tagged 0.1.2 on rules_nodejs, could you try that?

Fair warning, it's not working all the way on Windows yet, but I appreciate you paving this path, I'll clear what I can.

from angular-bazel-example.

gregbown avatar gregbown commented on May 6, 2024

Thank you Alex, the 0.1.2 update got it past install, but failed on build. Appears to be linking to some, what appear to be shortcut links that don't have a target. See image

C:\Users\gbown\Documents\bazel-angular\angular-bazel-example>bazel build src ERROR: error loading package 'src': Encountered error while reading extension file 'index.bzl': no such package '@angular//': No WORKSPACE file found in C:/users/gbown/appdata/local/temp/_bazel_gbown/afpn2gxi/external/angular.

bazel-build

My main issue is that I would really like to somehow integrate closure compiler into my build as we have a lot of internal pressure to launch our Angular application but I feel the build is just too large. Any advice on how best to achieve that would be awesome. I am also exploring your closure example I suppose without Bazel, I would need to figure out if or how to integrate that into a Webpack build so I can get scss integration along with AOT and JIT builds. I appreciate all the work you are doing in this area, any direction would be wonderful.

from angular-bazel-example.

alexeagle avatar alexeagle commented on May 6, 2024

re. that error - do you have package @angular/bazel installed? That link _bazel_gbown/afpn2gxi/external/angular should point to [workspace]/node_modules/@angular/bazel

@achew22 and co. are working on a prototype of connecting ts_library and ng_module output to a closure_js_binary rule from rules_closure which should do what you want. We have that internally at google so it's just a matter of reproducing the same build actions. They might have something you could try out soon.

from angular-bazel-example.

gregbown avatar gregbown commented on May 6, 2024

Weird, the bazel run @yarn//:yarn did not install node_modules. I had to run npm install

Okay, made it a bit further, now it seems to take issue with libsass. Is there un update to io_bazel_rules_sass? Sorry if I am monopolizing your day.

C:\Users\gbown\Documents\bazel-angular\angular-bazel-example>bazel build src INFO: Found 1 target... ERROR: C:/users/gbown/appdata/local/temp/_bazel_gbown/afpn2gxi/external/sassc/BUILD.bazel:4:1: C++ compilation of rule '@sassc//:sassc' failed (Exit 2). external/sassc/sassc.c(10): fatal error C1083: Cannot open include file: 'getopt.h': No such file or directory Target //src:src failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 4.391s, Critical Path: 0.35s

from angular-bazel-example.

alexeagle avatar alexeagle commented on May 6, 2024

from angular-bazel-example.

alexeagle avatar alexeagle commented on May 6, 2024

Hmm, I have trouble getting the C++ toolchain working on my windows tablet. Could you make a minimal repro on https://github.com/bazelbuild/rules_sass/issues
(just follow their README to make a minimal hello world compilation so the issue isn't confused with Angular stuff)

from angular-bazel-example.

gregbown avatar gregbown commented on May 6, 2024

Hi Alex, finally got back to working on build. I posted on rules_sass/issues with a minimal test following their folder, workspace and build directions.

It appears nobody is responding to issues at rules_sass though, all the issues are months old.

from angular-bazel-example.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.