
Rome: An experimental JavaScript toolchain - pcr910303
https://romejs.dev/
======
eclipsetheworld
Previous discussion:
[https://news.ycombinator.com/item?id=22430682](https://news.ycombinator.com/item?id=22430682)

~~~
dang
Same jokes too.

------
throwaway894345
Maybe this is intuitive to JS devs, but what are the advantages of "zero
third-party dependencies" and "being a comprehensive tool for the processing
of anything JS related" or any of the other selling points of Rome? It seems
like an impressive project, but it's not obvious to me what its actual
benefits are.

~~~
gear54rus
It's not intuitive to me as a JS dev too... Are you guys gonna re-implement
typescript for example? Where does 'no deps' line get drawn?

~~~
koboll
"No dependencies" isn't quite accurate. There are a couple, and they are
TypeScript and related packages:
[https://github.com/facebookexperimental/rome/tree/master/nod...](https://github.com/facebookexperimental/rome/tree/master/node_modules)

But everything else is on track to be reimplemented within Rome.

~~~
coolwhit
Note that the TypeScript dependency is not used at runtime. It's only used to
type check the Rome source code.

Source
[https://news.ycombinator.com/item?id=22431169](https://news.ycombinator.com/item?id=22431169)

------
sam_goody
Is this meant to replace Webpack + some list of plugins, does this get added
to Webpack, or is this meant to go somewhere else entirely in the JS
toolchain?

If this replaces Webpack, can someone please list a combination of popular
plugins that this compares to. (Or even a few lists - would it replace Grunt +
something?)

If not, can you tell me what other software this compares to, so that I can
better understand it?

I am sure that I am not the only one who has some familiarity, but doesn't
live in the system. Having a point of comparison would be extremely helpful.

~~~
coolwhit
The scope is even broader! Webpack is just a bundler. Rome is a bundler,
linter, test runner, typescript compiler, and formatter. The proper comparison
would be Webpack + ESLint + Jest + TSC + Prettier.

~~~
sam_goody
Thank you!

So, this is a bundler with built in plugins?

Is there is a way to add Babel etc, that I would have used with Webpack? Does
it handle CSS?

And why would I prefer this over that chain (simpler to set up? Trust in
Facebook over the people at js.foundation?)

~~~
coolwhit
The selling point is that you don't need plugins at all. Rome is the entire
toolchain in one tool. For example, you don't need to add Babel because Rome
handles transpilation.

The question is - will Rome perform as well as all the tools it intends to
replace. Can it be a better Babel than Babel is? (There's a good chance it
could since the creator of Rome is the creator of Babel)

~~~
ratww
I would bet on it performing better too, since
Webpack/Babel/ESLint/TSC/Terser/Prettier all have to parse/process/pretty-
print the code, using Javascript as the intermediate representation between
each tool. That's very wasteful.

With a unified tool you can use a single AST. Or even better: an intermediate
representation. You only need to parse and pretty-print once.

------
Raed667
I have been following the progress of this project on Twitter for months.
However I'm very skeptical to see this project used in a production app.

Re-implementing the entire JS toolchain for a modern SPA is a HUGE task, just
checkout CRA dependencies : [https://github.com/facebook/create-react-
app/blob/master/pac...](https://github.com/facebook/create-react-
app/blob/master/packages/react-scripts/package.json)

~~~
godot
It looks like Rome is a Facebook Open Source project, so there's reasons to
believe a huge amount of resources is being put into it (probably the only way
something like this is feasible).

(This is not a statement either pro or against FB, just a neutral one :)

~~~
nwienert
It was mostly built by one guy at least until very recently and not during
company time from what I hear for the most part. Perhaps it was, but either
way it doesn’t have huge firepower as of yet.

Then again, even React itself only has a small core team, same with lots of
Facebook projects. I think they should hire more aggressively and become more
of a tech-driven company (they should be fighting for the web platform too a
lot stronger).

------
_bxg1
The premise is attractive, but the challenge will be keeping up with a
rapidly-changing ecosystem. The advantage of letting Webpack and Babel be
separate, having both as singular community focal-points for their respective
tasks, and having both be extensible via plugins (the TypeScript team can work
independently from the Babel team, for example), is that the leg-work of
adding new JS features, parsing new syntaxes, keeping up with the spec, etc.
can be distributed in the most efficient way possible. A single team trying to
do _everything_ in-house, duplicating the work of all of the above
communities, will have a very hard time keeping up. But I wish them luck.

------
leetrout
I don't know if want this or if I really just want create-react-app for things
that aren't react. A lot of tools do things Good Enough (which everyone
disagrees on and will always fragment the ecosystem). But I do loathe setting
up all the plumbing from scratch.

~~~
Raed667
A lot of JS projects now have create-$X-app. Not all are as well thought out
as CRA but its a good start.

------
aarpmcgee
Rome seems fine but I find this approach to be a bit more interesting
[https://github.com/swc-project/swc](https://github.com/swc-project/swc) —
though Rome seems potentially broader in scope.

------
lxe
> Rome has a logo of an ancient Greek spartan helmet. It's not very relevant
> since it's not Roman, but it looks cooler than a Galea.

It's OK. JavaScript has very little to do with Java, so it fits.

~~~
mhd
Never mind that they're wrong, this isn't even a proper spartan helmet.

------
The_rationalist
Zero third party dependencies or how to market the [NIH /reinventing the wheel
syndrome]
([https://en.m.wikipedia.org/wiki/Not_invented_here](https://en.m.wikipedia.org/wiki/Not_invented_here))

------
dlbucci
This is a really exciting idea to me, but this website is pretty anemic
(guessing it's a work in progress?). Kinda surprising to me, given the 7K
stars on github. Maybe it should be submitted when it's a little more filled
in?

~~~
bikeshaving
As a person who’s getting ready to drop a project: what about the docs site is
“anemic”? It’s using docusaurus which is pretty snazzy as far as docs sites
go. Do you mean the amount of content on the site?

~~~
dlbucci
Content. It had like a single page, which didn't give me too much
information...

------
chrisseaton
What does it compile JavaScript to? WebAssembly or machine code or something
else?

~~~
qeternity
Probably ES6 to ES5

~~~
chrisseaton
Oh right a transpiler.

~~~
snazz
It's perfectly valid to call that a compiler.

~~~
chrisseaton
Yeah I know it’s just extra useful context to add that it’s a transpiler.
Otherwise you’re left confused about what it’s compiling to.

------
rvz
What a very 'interesting' name for a project that is an integrated and
consistent Javascript toolchain that aims to replace existing third party
libraries and tools. It may be too early to see if this is a good idea or not
but who knows, at least no one can say that this was built in a day.

------
earthboundkid
Does it work with Deno? I'd love to burn down the existing JS world and move
to a better one.

------
jvanveen
An alternative lightweight and fast JavaScript buildchain using Snowpack:
[https://github.com/garage11/vuepack-
demo](https://github.com/garage11/vuepack-demo)

------
capableweb
It says "No Third Party Dependencies" but 95% of the code is written in
TypeScript, so it isn't even JavaScript and the entire thing is built on top
of one big dependency.

Would not be a problem if it didn't sell itself as "zero third party
dependencies" while being built on top of one that is not even JavaScript...
Might as well built the tool in any other language that would have been better
for the task.

~~~
W4ldi
typescript is just a language, how is that a dependency? by that logic,
nothing is dependency free.

~~~
joosters
But the end users can't run the typescript, whereas they can run javascript
directly. So, an external tool is required by the developer.

A similar comparison would be shipping a program to end users, saying that 'no
dependencies required', but instead of giving them a binary to run, you hand
them a c++ file. I think everyone would agree that a C++ compiler is clearly a
required dependency in that case.

~~~
jfkebwjsbx
Nobody says a C file has a "dependency" because you have to compile it.

~~~
anfilt
Like that point is fair, but almost no C code has no dependencies. Like just a
basic application that returns 0 and nothing else from main will need to link
to crt0.
[https://en.wikipedia.org/wiki/Crt0](https://en.wikipedia.org/wiki/Crt0)

However, you can compile C code as a bin file (just instructions). More common
in the embedded world or you need to bootstrap an OS ect...

~~~
jfkebwjsbx
Static binaries do not have any dependency, and those that are not static
typically depend on libc etc., regardless of the language being C, JavaScript
(the browser) or anything else. So we don't count them as "dependencies".

But my point above was to counter the "C compiler is a dependency" claim.
Nobody counts that way when discussing running programs, and that was my
point.

~~~
anfilt
There are dependencies to build a program, and dependencies to run it. Sure a
static binary can run without any _run time dependencies_ if written to run on
bare metal (without an OS). Although, you could go further down that rabbit
hole and say the hardware is a dependency. ( _better start writing stuff in
VHDL and Verilog /s_)

Both types of dependencies do come up. However, most people don't consider
language dependencies. However, if you for instances need to port your code to
a lot systems such dependencies can suddenly be very important. Especially if
you have to do the porting. So to say: "Nobody says a C file has a
"dependency" because you have to compile it." is a bit disingenuous. There is
a lot of C code that require features only available in certain compilers. At
which point that code now depends on that compiler.

However, JS seems to have problem with too many dependencies, at times these
dependencies can be trivial that is makes someone ask why...

------
RcouF1uZ4gsC
From the Getting Started Guide:

> Then, navigate into it and build rome:

> cd rome; ./scripts/build-release dist

Be aware that this command might take a long time to complete. After all, Rome
wasn't built in a day.

~~~
pdxandi
I know they said in the GitHub readme, but I still chuckled. Good chance I'm
just losing my mind.

------
georgestephanis
I mean, clarifying that it's in-progress is important.

After all, Rome wasn't built in a day.

~~~
capableweb
For more information about the name, the README elaborates:

> Rome gets its name from proverbs such as "All Roads Lead to Rome", "Rome
> wasn't built in a day" and "When in Rome, do as the Romans do". This refers
> to the expansive scope and the desire for conformity across the project. It
> started as a joke at the office.

[https://github.com/facebookexperimental/rome#history](https://github.com/facebookexperimental/rome#history)

------
speedgoose
Who is going to maintain all of this in a few months or years when Facebook
has moved on?

~~~
dschnurr
If they end up using Rome internally that should be a good sign that it will
be supported for years to come. React has been very well maintained for the
past 5+ years.

~~~
speedgoose
I don't know. I don't think they stopped testing, but their open-source
javascript testing framework jest has been unmaintained for a little while.

~~~
petetnt
Jest had a new release 5 days ago, so "a little while" is quite literally a
very short while.

~~~
speedgoose
My bad. It feels unmaintained though.

------
mhd
The primary dependency I'd like to get rid of when developing JS would be the
big corporations. Between my compiler, my linter and my frontend tool, there's
quite an empire of evil.

