You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on the rebase for Chromium 100, we noticed a build failure when building Chromium's 3rd party dependency devtools-frontend, that will fail with an error: Transforming const to the configured target environment ("es5") is not supported yet error message.
Looking into it a bit more, we found out that the devtools-frontend dependency has recently started to depend on esbuild, which in turn seems to required features to compile the TS code that are not available when targeting the ES5 module, but more recent ones such as ESNEXT. We could test this was correct simply by changing the contents of brave-browser's tsconfig.json file like this (thanks @emerick who found that out):
- "target": "es5",+ "target": "esnext",
Talking to @petemill he confirms that the issue here seems to be that having this tsconfig.json file in the topmost directory we use for building (i.e. the dir where brave-browser repo is checked out) is causing any other TS project in the subdirs from there -including src/third_party/devtools-frontend) to pick up those settings, and therefore fail like with the error mentioned above.
@petemill also confirmed that targetting es5 is wrong anyway and we should be targetting esnext instead which, so we could simply change that. However, considering that such file hasn't been touched since 2018 and that the idea is that brave-core should eventually be built without brave-browser at all, we agreed on trying to remove the file instead as long as it does not break the build.
Thus, I just run a full build from scratch now on master with that file removed from brave-browser and I can confirm that I could build without issues, so I'm formally filing this bug to attach a PR to it 😇, so that once we get cr99 rebased on top of master and then cr100 on top of it, we can continue with the Chromium 100 rebase without issues.
The text was updated successfully, but these errors were encountered:
As explained in the description of the issue, let's remove this file
which hasn't been touched since 2018 and it's not really being used
at all, as it's causing build problems starting with Chromium 100
due to devtools requiring to target the `esnext` module instead of
the `es5` one.
Resolves#21178
Description
While working on the rebase for Chromium 100, we noticed a build failure when building Chromium's 3rd party dependency
devtools-frontend
, that will fail with anerror: Transforming const to the configured target environment ("es5") is not supported yet
error message.Looking into it a bit more, we found out that the devtools-frontend dependency has recently started to depend on esbuild, which in turn seems to required features to compile the TS code that are not available when targeting the ES5 module, but more recent ones such as ESNEXT. We could test this was correct simply by changing the contents of brave-browser's
tsconfig.json
file like this (thanks @emerick who found that out):Talking to @petemill he confirms that the issue here seems to be that having this
tsconfig.json
file in the topmost directory we use for building (i.e. the dir where brave-browser repo is checked out) is causing any other TS project in the subdirs from there -includingsrc/third_party/devtools-frontend
) to pick up those settings, and therefore fail like with the error mentioned above.@petemill also confirmed that targetting
es5
is wrong anyway and we should be targettingesnext
instead which, so we could simply change that. However, considering that such file hasn't been touched since 2018 and that the idea is that brave-core should eventually be built without brave-browser at all, we agreed on trying to remove the file instead as long as it does not break the build.Thus, I just run a full build from scratch now on
master
with that file removed from brave-browser and I can confirm that I could build without issues, so I'm formally filing this bug to attach a PR to it 😇, so that once we getcr99
rebased on top ofmaster
and thencr100
on top of it, we can continue with the Chromium 100 rebase without issues.The text was updated successfully, but these errors were encountered: