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/deprecate flisp parser/JULIA_USE_FLISP_PARSER env var (and flisp in full, eventually, for other things, such as bootstrap) #55061

Closed
PallHaraldsson opened this issue Jul 7, 2024 · 3 comments
Labels
compiler:lowering Syntax lowering (compiler front end, 2nd stage) parser Language parsing and surface syntax

Comments

@PallHaraldsson
Copy link
Contributor

PallHaraldsson commented Jul 7, 2024

Does JuliaSyntax.jl (added in 1.10) actually have any bugs, i.e. a need to flisp parser to exits?

JuliaSyntax.jl is now used as the default parser, providing better diagnostics and faster parsing. Set environment variable JULIA_USE_FLISP_PARSER to 1 to switch back to the old parser if necessary (and if you find this necessary, please file an issue)

A.
The flisp parser should be dropped right now, at least for 1.12 to make Julia smaller/simpler, if not for 1.11. I might not be the best person to do it, but am still willing to do it, make a PR to at least drop just the env var support. Keno considers the parser supported (that wasn't a long-term plan I think, or for how long 1 or 2 releases?): #55023 (comment)

conditional on JuliaSyntax actually being in the system image. As of right now, the flisp parser is still supported and things shouldn't error if JuliaSyntax is not available.

I realize we already have an RC for 1.11, and 1.11rc2 coming, so a question does a feature freeze apply to drop (off-by default) features like this?

I.e. is dropping a feature considered a "feature"? It's trivial to drop the env var support, making the feature disabled, meaning unable to enabled it. I'm not sure if "dead code elimination" will make Julia any smaller, at least then flisp could be dropped in 1.11 point release. If we keep the old parser then it's a promise to keep it for all 1.11.x. It could however be trivially added back in 1.11.x in case a mistake to drop it.]

B.

Julia --lisp

should also be dropped. Nobody relies on it. It's kind of an Easter egg. If anyone considers it supported flisp can't be dropped. Besides that and the parser not much else depends on it, only bootstrap? I just don't know enough about that, how to drop the rest of flisp uses, but I at least believe it's all internal. What is the gain in size/startup cost to just drop the parser. or all of flisp? It IS rather small code...

@oscardssmith
Copy link
Member

we're way way way to late for 1.11. we also can't delete flisp parser until we have a wait to bootstrap without it. also, the benefit of removal is pretty small until lowering is also in Julia.

@PallHaraldsson
Copy link
Contributor Author

But ok to drop for 1.12, i.e. a PR wanted? I knew flisp needed for bootstrap, but you mean not just flisp, but the flisp parser is needed? Then I guess I can't make the change, or do not trust myself to do it, but I could drop the env var support and all user-visible stuff.

@PallHaraldsson PallHaraldsson changed the title Drop/deprecate flisp parser/JULIA_USE_FLISP_PARSER env var (and flisp for other things) Drop/deprecate flisp parser/JULIA_USE_FLISP_PARSER env var (and flisp in full, eventually, for other things, such as bootstrap) Jul 7, 2024
@KristofferC
Copy link
Sponsor Member

It's needed for bootstrapping right now. I don't think there needs to be a dedicated issue about this, there is also no rush doing any of this really.

@nsajko nsajko added parser Language parsing and surface syntax compiler:lowering Syntax lowering (compiler front end, 2nd stage) labels Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:lowering Syntax lowering (compiler front end, 2nd stage) parser Language parsing and surface syntax
Projects
None yet
Development

No branches or pull requests

4 participants