Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: additional checks for source tree #354

Open
jkloetzke opened this issue Jun 27, 2020 · 3 comments
Open

build: additional checks for source tree #354

jkloetzke opened this issue Jun 27, 2020 · 3 comments

Comments

@jkloetzke
Copy link
Member

Re-hash the src workspace after the build step to detect inadvertent changes. Only useful when building outside of a sandbox. Should probably only be done in release mode and Jenkins builds by default.

@rhubert
Copy link
Contributor

rhubert commented Sep 30, 2020

Maybe it's also useful to rehash the dist workspace of dependencies. I had a bad gpr file of a ADA-Library resulting in a rebuild of that library in it's dist when the lib was used by another component. 😢 🙈

@DevelAngel
Copy link

@rhubert If the dist has not the same hash anymore, bob should throw an error in my humble opinion because it leads to unexpected builds in the case the dependency is used more than once.

Shortly, I prepared test data in a package for test runs and I used the dist path directly. But I noticed that the test would change those test files.. (Now, I made a copy of it when I execute the tests.)

What would happen if a second test is using the dist folder?!

Rerunning the packageScript for each use of a dependency is maybe a solution without errors but it would slow down the overall build time. I would be confused if the package step runs more than once but I am unsure how easy it is to detect that misbehavior.

@jkloetzke
Copy link
Member Author

My idea was to make this an optional check and fail the build if changes to the dependency workspaces are detected. The initial idea was to check just src workspaces but given your input we should check all dependencies. These are all mounted read-only anyway when using a sandbox. It is simply not allowed to change dependency workspaces and there is no reasonable way to allow that.

I would only enable the check in "bob build" mode by default. For "bob dev" it should be a user choice to enable it. And when we have a sandbox the check is superfluous anyway because these workspaces are all read-only for the script...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants