You’re done adding a new feature to your DSL. Time to rebuild your project to test it out. It usually takes a couple minutes, so you go get a cup of coffee in the meantime.
A few minutes later you come back to an error like this:
“Dependencies should be extracted into build script! Rebuild failed!”
What? Not that stupid error again! Yes, you added this dependency an hour ago, but you built the project multiple times since then without MPS saying a word except “Build successful”! So why now? Ah, because MPS doesn’t build the build scripts when module dependencies change, so they often get stale. And when rebuilding your project MPS didn’t get to the interesting parts of your code because the build scripts were built first.
It’s so easy to fix, but…
Anyway, you know what the problem is and you know how to fix the error, now you just have to do it. You click to switch to the project view, browse it for a minute to find that build script, expand the build solution, expand the build model, open the build script, Alt+Enter, Reload modules from disk, done!
Time for another rebuild and another break. You brought the coffee already, that precious flow state you were in, concentrating on designing your DSL, is gone anyway, so you reflect a bit about this little episode…
The error is so annoyingly easy to fix that it’s almost insulting that you have to do it! Weren’t machines supposed to save us from this kind of mundane routine work? Shouldn’t there be a better way?
Fixing the error wasn’t a big deal. What sucked was that you had to stop what you were doing (and thinking!) and go do what the machine wanted you to do. You’re no longer in control. You’re serving the machine instead of the machine helping you.
Does it have to be like this?
What if you could keep your build scripts always up to date? What if you knew immediately when they need fixing? What if the computer could just fix the build scripts for you? Fewer interruptions mean deeper concentration and more fun at work.
And questions like these could be more fun to think of:
- Should I let my users type in what they want or only what is correct?
- Can I make this expression easier to type?
- How can I liven up the editor? Maybe I could add a few colors here and there?
- For this new feature I’m building, should I create new concepts or extend the existing concepts?
Take your (work)flow back!
With the Build Script Notifier plugin you can get notified immediately when your build scripts go out of date due to dependency changes. The plugin monitors your project modules and checks the build scripts every time module dependencies change. It notifies you when the scripts need to be updated.
But not only that, it can also fix the simple errors automatically without you having to hunt for that build solution in the project view and wait for MPS to open the build script. You click, it updates the build script in the background, done!
And if you’re not sure whether the plugin is working or not, you can force a check of your build scripts by invoking Build → Check Build Scripts from the menu.
Relegate the machine to its proper supporting place, and take back control over your (work)flow!
Installing the plugin
In your MPS, go to Settings/Preferences → Plugins → Search for ‘build script notifier’ (click Search in Marketplace if you get no results). Install, restart, and you’re done. The plugin works with MPS version 2019.3 or higher and has no further dependencies.
You can also visit the plugin home page at the JetBrains Marketplace.