Is Closure Compiler still actively maintained?

110 views
Skip to first unread message

a...@scirra.com

unread,
Jan 16, 2024, 10:56:48 AMJan 16
to Closure Compiler Discuss
Hi folks,

It looks like Closure Compiler used to have releases about once a month. However currently since May 2023, there has only been a single release back in August. I was wondering if it's still being actively developed?

Closure Compiler is one of the best quality and most robust tools for minifying JavaScript. We're keen to see support for private/public class fields be added, since those are starting to get used more, especially when compiling from TypeScript to JavaScript, as that requires class properties to be declared as fields. We don't need or want Closure Compiler to transpile class fields, just not throw an error when it sees them (or ideally do property mangling with them too), as we just want minification. If Closure Compiler isn't being actively developed towards that any more I guess we might need to look for an alternative.

I appreciate all the work that's been done on Closure Compiler - I'm just after a status update really.

Best regards

Ashley

Ben Lickly

unread,
Jan 16, 2024, 5:48:48 PMJan 16
to Closure Compiler Discuss
Hi Ashley, 

Thanks for checking in.

Closure Compiler is being actively developed at Google, where it is still being actively used. Currently we use the `--target 2021` tsconfig option which transpiles away the public fields (along with `--useDefineForClassFields false` which makes the output in a format that Closure Compiler analyzes better).

That said, the support for public fields is mostly complete (unfortunately not #private fields yet), and we are actively working to switch over to using it.  You can try out public field support by using the flags: 
```
 --language_in UNSTABLE --language_out UNSTABLE
```
If you run into any issues, we'd be glad to hear them as we are actively working on this support.

The other part of your question is about releases, and we don't really have much to report yet there.  I think one issue is that since we run mostly from head internally, the releases are work that we don't get to use at Google and that makes it sometimes harder to prioritize when issues come up.  I'm still hoping that we can get the releases working again, but I don't have any timeline that I can promise. 

a...@scirra.com

unread,
Jan 18, 2024, 9:35:34 AMJan 18
to Closure Compiler Discuss
Thanks for the `--target 2021` tip, that looks like it will work well.

We'll investigate the UNSTABLE support, perhaps it's something we can use, but I'm a bit wary about using an experimental mode like that in general, as it seems there might be other issues that come up from that. Is there any documentation on the status of unstable mode, what's supported, what might go wrong, etc?

For what it's worth - it would be great if Closure Compiler could at least passthrough new JS features. We've had issues with things like errors using dynamic imports, and now public/private fields, where compilation entirely fails if it sees something it doesn't support. It can leave you pretty stuck as you get no output at all until you completely remove those features. If it just issued a warning and left it unmodified in output it would be much easier to progressively support new features, rather than being blocked on Closure Compiler supporting it. Although I can imagine it may be one of those things easier said than done!

Richard Connamacher

unread,
Jan 25, 2024, 3:54:45 PMJan 25
to Closure Compiler Discuss
About running from head, if Google could automate the NPM deployments for google-closure-compiler from every successful commit to head, that'd go a long way to helping people outside Google stay up to date. Then a normal release every few months with changelog summaries in the wiki as they are today would be a nice bonus.

Chad Killingsworth

unread,
Jan 29, 2024, 8:09:22 AMJan 29
to closure-comp...@googlegroups.com
A nightly build is published to NPM normally. Right now those are halted, but I expect them to return. https://www.npmjs.com/package/google-closure-compiler?activeTab=versions

--

---
You received this message because you are subscribed to the Google Groups "Closure Compiler Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to closure-compiler-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/closure-compiler-discuss/109c7811-c742-4478-9225-f928b1b5f50cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages