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

Build broken on master after espree upgrade #11014

Closed
not-an-aardvark opened this issue Oct 24, 2018 · 1 comment
Closed

Build broken on master after espree upgrade #11014

not-an-aardvark opened this issue Oct 24, 2018 · 1 comment
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly build This change relates to ESLint's build process

Comments

@not-an-aardvark
Copy link
Member

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

npm test

What did you expect to happen?

The build should pass.

What actually happened? Please include the actual, raw output from ESLint.

The build did not pass. The following output was produced during the gensite tests:

PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
  {
    "message": "SyntaxError: Expected an identifier but found '{' instead\nat build/eslint.js:7581:0",
    "str": "SyntaxError: Expected an identifier but found '{' instead\nat build/eslint.js:7581:0"
  }

Finished in 0.174 secs / 0 secs @ 16:47:26 GMT-0400 (Eastern Daylight Time)

SUMMARY:
✔ 0 tests completed
PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
  {
    "message": "TypeError: undefined is not a constructor (evaluating 'new Linter()')\nat tests/lib/linter.js:2534:28",
    "str": "TypeError: undefined is not a constructor (evaluating 'new Linter()')\nat tests/lib/linter.js:2534:28"
  }

✖ Error while running the tests! Exit code: 1

I haven't investigated the problem yet, but I found that downgrading espree back to 4.0.0 made the problem go away. At first glance, it seems like the generated browser version of Linter has a syntax error (or ES6 syntax).

@not-an-aardvark not-an-aardvark added bug ESLint is working incorrectly build This change relates to ESLint's build process accepted There is consensus among the team that this change meets the criteria for inclusion labels Oct 24, 2018
@not-an-aardvark
Copy link
Member Author

not-an-aardvark commented Oct 24, 2018

The problem might be that eslint/espree@8eadb88 added ES6 syntax to espree for the first time, and we're not compiling code in dependencies down to ES5. As far as semver is concerned, this is valid since espree supports Node >=6.0.0, but if this is the cause of the issue we might need to adjust our build process so that we also compile dependencies.

edit: I've confirmed that this is the issue. The syntax error is occurring on this line from the new version of acorn-jsx.

not-an-aardvark added a commit that referenced this issue Oct 24, 2018
Previously, the build process would compile ESLint's dependencies to ES5 when generating a website bundle, but not espree's dependencies. Now that espree has dependencies with ES6 code, it's necessary to also compile espree's dependencies.
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Apr 23, 2019
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Apr 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly build This change relates to ESLint's build process
Projects
None yet
Development

No branches or pull requests

1 participant