google / jsinterop-base

Utilities for GWT and J2CL to interact with JavaScript beyond JsInterop
Apache License 2.0
67 stars 16 forks source link

Build fails on Mac OS due to using sed in-place with symbolic link #16

Closed johnthuss closed 3 years ago

johnthuss commented 3 years ago

The build step that uses sed to replace the "// J2CL_only" tokens causes the build to fail on Mac OS since it uses in-place replacement on a symbolic link.

sed -i.bak '\''s|// J2CL_ONLY ||g'

The error given is: sed: java/jsinterop/base/Any.java: in-place editing only works for regular files

You can workaround it by using "gsed" (gnu-sed) instead, which is available from homebrew: "brew install gnu-sed".

build.log

realityforge commented 3 years ago

It also forces you to supply “build --spawn_strategy=local” in bazelrc or on cli which is super annoying

gkdn commented 3 years ago

It seems like most don't see that due to custom bazelrc which is recommended for our users. Could you send a patch?