Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Monorepos allow you to do very bad hacks (I need this other component over there; let me just put in a Symlink. Done.).

Why would you put in a symlink? You could just provide a path to the actual component and import it into your project.

> the worst thing you can get that you'll have to assemble multiple distinct, well-encapsulated (in terms of project structure) things into one

When you have multiple repos, you also have multiple versions and releases of things. Now every team has the following options:

1. Backport critical fixes to every version still in use (hard to scale)

2. Publish a deprecation policy, aggressively deprecate older releases, and ignore pleading and begging from any team that fails to upgrade (infeasible - there'll always be a team that can't upgrade at that moment for some reason)

You also have to solve the conflicting diamond dependency problem. This is when libfoo and libbar both depend on different versions of libbarfoodep. It's even more fun in Java because everything compiles and builds, but fails at runtime. So now you have to add rules and checks to your entire dependency tree - some package managers have this (Maven), others don't (npm IIRC).



> Why would you put in a symlink? You could just provide a path to the actual component and import it into your project.

Where do I need to put the path again? Ah what the heck, I'll just add a symlink inside a folder that's already somewhere in the build definitions.


What language and build tool is this that you're using?

I don't know anyone who has abused Maven or Cargo or Go like this. And I don't imagine Visual Studio Solutions for C# are used like this.

Is there an underlying disagreement based on JS/Ruby/Python scriptish coding (which creaks when a lot of developers work on it) vs C and C++ (which have astonishingly bad build system stories) vs big-iron languages that don't sweat when in a monorepo.


> And I don't imagine Visual Studio Solutions for C# are used like this.

At my workplace, we've just been cleaning up a whole bunch of instances of exactly that anti-pattern. Except that it's obviously not symlinks (which require specific user rights on Windows), but links to external files in VS.

Same problem, though: They're easy to introduce and a pain to deal with later on.


I have never done such a hack myself, but I've seen it. Mostly in C++ projects ;)


Could a VCS simply blacklist symlink files? Plus if you have developers doing crap like this (and their colleagues letting it slide in code reviews) you have problems that can't be solved by monorepo vs polyrepo. You have an engineering culture problem.


No VCS will ever protect you from crappy code though.


That's true, but we should at least make it as hard as possible to write crappy code ;)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: