chore(bazel): enable rules_esbuild sandbox with object-inspect workaround#61969
Conversation
fd509ef to
652d0e6
Compare
b7fa259 to
cf2a1c8
Compare
5150396 to
5db1845
Compare
8c070f6 to
6f720f6
Compare
8342914 to
7931d31
Compare
7931d31 to
1300a5d
Compare
| name = "fetch-mock", | ||
| srcs = ["src/fetch.js"], | ||
| declarations = ["src/fetch.js"], | ||
| types = ["src/fetch.js"], |
There was a problem hiding this comment.
| "mz": { | ||
| "dependencies": { | ||
| "graceful-fs": "*" | ||
| } | ||
| }, |
There was a problem hiding this comment.
Point the finger of shame at this shameful package
There was a problem hiding this comment.
https://www.npmjs.com/package/mz "modernize" ... grabs pitchfork TO ARMS
| "follow-redirects": { | ||
| "dependencies": { | ||
| "debug": "*" | ||
| } | ||
| }, | ||
| "debug": { | ||
| "dependencies": { | ||
| "supports-color": "*" | ||
| } | ||
| }, |
There was a problem hiding this comment.
These are less shameful (the deps are marked as optional in peerDependenciesMeta and idk if theres a better way to surface them without adding them directly to our root dependencies list)
|
|
||
| - return await resolveInExecroot(build, importPath, otherOptions) | ||
| + const res = await resolveInExecroot(build, importPath, otherOptions) | ||
| + // Needed due to an issue with esbuild when it comes to plguins + `"browser": false` in package.json |
There was a problem hiding this comment.
From now on the Cody PLG team shall be referred to as "PLGuins"
There was a problem hiding this comment.
darn, I completely skimmed this 😆 didnt notice the typo
burmudar
left a comment
There was a problem hiding this comment.
For the uninitiated - how did you find the offending packages that did not declare their deps properly?
See the build errors here: https://buildkite.com/sourcegraph/sourcegraph/builds/276958. For better behaved packages, its a case of it being an optional peer dependency (aka one that would be dragged in by another package afaik, so not brought in my default) |
Sandbox escapes be-gone
Test plan
Tested in CI and locally with
bazel build //client/...as well as a lot of blood, sweat n tears tearing through failed sandboxesChangelog