revbayes / revbayes.github.io

https://revbayes.github.io
7 stars 11 forks source link

Replicating/executing build.sh in VSCode #32

Closed ms609 closed 2 weeks ago

ms609 commented 1 month ago

I've been following the IDE setup guide to work with RevBayes in VSCode.

One thing it's taken me a while to figure out is that because VSCode doesn't incorporate build.sh into its build routine, certain actions need to be performed manually when certain files are changed.

The key aspects are:

I'm not sure what the most appropriate approach is here – to configure VSCode to run a (modified?) version of build.sh, or to manually perform these steps before build. It would be useful to incorporate guidelines in the IDE setup guide, if possible.

bredelings commented 1 month ago

My impression was that the IDE setup guide is suggesting that you run build.sh from the command line first. The suggestion to do so is quite terse:

You will first need to install RevBayes from source.

You will probably need to re-run it (or re-run regenerate.sh) if you add or remove files.

Perhaps we could expand the terse sentence that I quoted into an additional section that comes before the IDE setup stuff.

ms609 commented 1 month ago

Yes, it was the adding and removing files that I was referring to in particular – as I'm new to cmake, I hadn't understood that the build script was necessary in order to update which libraries are included. It would be useful to automate the generate_version_number.sh step too, so the binaries show the correct compilation time. I don't know whether that's something that VSCode can accomplish in a straightforward manner.

This said, I'd also be in favour of expanding the terse sentence – I must admit that I overlooked it at first, as my subconscious substituted 'download' for 'install' and I didn't immediately realise there was an extra step beyond checking out the source code.