The other day someone asked here about having private code within their company. Here are some ideas that makes sense to me.
Idea
It sounds like the root thing people want is not that intense. Imagine you have a file called multi-repo.json
like this:
{
"https://github.com/company/thing.git": "a41fee"
}
And then you have a little bash script called setup-multi-repo
that takes the contents of this record and:
- Makes sure everything is downloaded properly / lets you know if there are any local changes.
- Reads
elm.json
and adds in the local directories as"source-directories"
Now you can call elm
and it can figure everything out.
Considerations
Given what I have heard so far, different companies want different things from this script. Maybe some people use GitHub, but maybe others use something else. Maybe some people already pay npm
money, and can just go off that. Maybe some people want versions and some people want commit hashes. It seems hard for me personally to design for those situations. I’m not in those situations, and people seem to really dislike my intuitions about what makes sense.
From the very earliest designs on the compiler and packages, I knew that I do not want to be in the build tool business. There is a slow process where you add things one at a time until you accidentally made a turing complete language for build scripts. Oopsie! Now you have a accidentally designed language that feels complex for even the simplest task because everybody has different needs and they all turned into features. So I have been pretty specific about making sure elm.json
is just about data so far.
Furthermore, the fact that we have a GitHub integration for packages already makes people mad. They want integrations with all the other things. And all the future other things. I don’t like having integrations in the first place, so my goal would be to have zero rather than N. This project seems like another “we want N integrations” path, and I don’t have resources to have final responsibility for that sort of project.
So I think folks should just write scripts exploring this and share them if they want to. My only ask is that any efforts along these lines are marked as “for companies” or “for professional use” such that people do not come to Elm under the impression that they need a fancy build tool for anything. For a company that uses a monorepo (and studies how and why Google uses that strategy) you do not need any of this. This is for a specific use-case, and my main anxiety is that “beginner tutorials” would point folks to tools for specific professional users.