Hacker News new | past | comments | ask | show | jobs | submit login

Alire is a frontend to the toolchain, including gprbuild, it just handles grabbing the projects as well.



Yes, but it kinda locks you into running 'alr build' and adds other things inside 'config' directory like user's distro and other things. My guess it's probably great when you already have a done project and want to publish it, but if you want to compile your code ASAP, it's much easier to avoid it completely (except for pulling packages)


Alire puts "/obj/", "/bin/", "/alire/", and "/config/" into its .gitignore when creating a new project so the platform-specific stuff shouldn't end up on other developer's machines. After your initial "alr init --bin myproj" you can dive into your "myproj.gpr" and do more than what alire supports in its toml file.


Turns out putting "config" in .gitignore isn't a very good idea. Or, at least, there's a problem with what setting go into "config". In particular, compiler options, end up ignored... I had to undo it in the project I'm working on because I got tired of having to restore these options every time I change something else in dependencies / other project configuration.


We use SVN in our university lab, so no, that didn't work when I tried it initially. obj and bin was obvious to ignore, but I wasn't so sure about config and alire, might be helpful though


which is fine if you're using git. Just like asking me for my github login would be fine, if I used github and expected to ever distribute sdl_helloworld.


literally

alr init --bin new_project

cd new_project

alr edit


What's the need to compiler code ASAP? I understand it that you mean the initial effort, as running whatever command you normally use to build will have just the same amount of effort regardless of its length... But, even if for some reason you are typing it out every time: the difference will amount to just a few characters...

I mean, how long of a delay are we talking about?

----

As an aside, for me, a newcomer, GPRBuild is hard to deal with. I've dealt with at least a dozen of build systems, and GPRBuild isn't something I'm excited about. It belongs in the same category as Maven / Gradle / MSBuild / Bazel etc.: very bad at debugging, very limited documentation, impossible to tell what things are possible...

The way for me to deal with GPRBuild is to create a project file using Alire, and when something breaks -- use Web search to find what needs to be changed. GNAT's errors are in general very, very bad, but when it comes to GPRBuild, it's almost like MS: the only use for the error message is that it's hopefully unique enough that there's a KB article somewhere that references it by id.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: