fortran-lang / stdlib

Fortran Standard Library
https://stdlib.fortran-lang.org
MIT License
1.02k stars 161 forks source link

fpm deployment enhancement #802

Closed jalvesz closed 2 months ago

jalvesz commented 2 months ago

791 #790 #787

Enable building stdlib with fpm directly from the root folder

python config/fypp_deployment.py fpm build

Deploy the stdlib-fpm from the preprocessing created in the root folder. This deployment could be rendered unnecessary by building directly stdlib from the root.

jalvesz commented 2 months ago

@perazz maybe you know if there is a way to avoid launching the tests test_always_fail and test_always_skip when doing fpm test ? The other solution I have in mind is to explicitly add the tests to the manifest and deactivate the auto-tests option?

perazz commented 2 months ago

Yes I fear that would be the only option, though it's clearly sub-optimal (for each new test, it will have to be added to fpm.toml). I think the question is why those tests are there in the first place for? In other words, is there a valid reason those dummy tests should be kept into stdlib, or they could be safely removed? At the end of the day they are testing test-drive rather than stdlib.

jalvesz commented 2 months ago

I think the question is why those tests are there in the first place for? In other words, is there a valid reason those dummy tests should be kept into stdlib, or they could be safely removed?

I was wondering the same thing!

jvdp1 commented 2 months ago

I think the question is why those tests are there in the first place for? In other words, is there a valid reason those dummy tests should be kept into stdlib, or they could be safely removed?

I was wondering the same thing!

These tests were introduced for testing the procedure check in stdlib_error. Later we started to use test-drive. If check is not used anymore, I guess these tests could be removed.

jalvesz commented 2 months ago

Thanks @jvdp1, removing those tests enables indeed testing from the root build using fpm!

I'll propose a modification to the README.md before moving from draft to ready for review.

jalvesz commented 2 months ago

Down the road, I think we may want this script to be able to pass whatever defined preprocessor macros to the fpm.toml:

Totally! While in the current PR I intentionally striped out that function to make things concise, in the script I posted in #791 that function is still available and can be easily added.

jvdp1 commented 2 months ago

@jalvesz @perazz It seems that this PR is ready. I will merge it in a couple of days.