Open Bug 1827456 Opened 2 years ago Updated 7 months ago

Re-enable prettier for self-hosted code

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

Tracking Status
firefox114 --- affected

People

(Reporter: standard8, Unassigned)

References

(Blocks 1 open bug)

Details

I've been working on separating the running of ESLint and Prettier into separate processes (bug 1809497). We need to do this for various reasons, and I'm hoping to land it this week, so that I can then have time to prepare for the next stage ready for the 115 cycle.

Unfortunately, I didn't realise that we had done specific work to get prettier enabled for the self-hosted code (bug 1782273). Due to the separation of ESLint & Prettier, the preprocessor will no longer work for the self-hosted code.

I think there's a couple of options here:

  1. See if we can get a Prettier plugin working, we might be able to re-use some of the code from the ESlint plugin.

  2. I have no knowledge about where the code comes from or how it is constructed, but would it be possible to avoid the preprocessing for most of the files, by doing something similar to AppConstants? This would avoid needing to do extra work in future, but maybe there is something preventing this?

(In reply to Mark Banner (:standard8) from comment #0)

  1. I have no knowledge about where the code comes from or how it is constructed, but would it be possible to avoid the preprocessing for most of the files, by doing something similar to AppConstants? This would avoid needing to do extra work in future, but maybe there is something preventing this?

No, it's not possible to avoid the preprocessor directives in self-hosted code. They're used to ifdef-out parts we don't ship in release (debug or nightly-only features), macros are used for assertions, RegExp codes #includes other files, etc.

Severity: -- → N/A
Priority: -- → P3
No longer blocks: sm-meta
You need to log in before you can comment on or make changes to this bug.