Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop tsconfig.json from brave-browser repository #21178

Closed
mariospr opened this issue Feb 17, 2022 · 0 comments · Fixed by #21179
Closed

Drop tsconfig.json from brave-browser repository #21178

mariospr opened this issue Feb 17, 2022 · 0 comments · Fixed by #21179

Comments

@mariospr
Copy link
Contributor

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 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.

@mariospr mariospr added this to Needs triage in Chromium Rebasing via automation Feb 17, 2022
@mariospr mariospr self-assigned this Feb 17, 2022
mariospr added a commit that referenced this issue Feb 17, 2022
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
Chromium Rebasing automation moved this from Needs triage to Done Feb 18, 2022
mariospr added a commit that referenced this issue Feb 18, 2022
Drop unused (and problematic) tsconfig.json file
@mariospr mariospr added this to the 1.37.x - Nightly milestone Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

1 participant