-
Notifications
You must be signed in to change notification settings - Fork 44
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
multiPackage with MultiSources after remove of pickle module #4
Comments
There is a slight chance that specially crafted environment variables could go undetected. I pushed a fix for that but I don't expect that this is the case here. The commit in question would possibly reduce the detected variants, not increase them as reported. Therefor I suspect that the old directories just got unused and new ones got created due to the changed digest algorithm. Could you please double check that all the directories are actually used (maybe "bob clean")? |
With the latest fix it's still the same issue. I opened a pull request to the tutorials showing the issue. First time I want to build against debug version of lib:
Source path was lib-debug. Now I change the root recipe to build against release lib.
-> checkout the same sources into a new directory :( But - and now I really confused - with this example there are always two source directories ( db49f07 don't care). In my project and without db49f07 I have debug and release building from the same sources? |
I pushed another commit on my bob-tutorials branch, adding two more recipes. But if you change the dependency in Not sure what's the bug in this case.. :-| |
Well, this is the dark side of the dev mode at work. ;-) The problem is how the dev mode calculates the used directories. The algorithm is actually quite simple:
The key to the behavior is the developNameFormatter (build.py:291). If the digest of a step was already seen it will reuse the directory. Otherwise a new directory is assigned for the digest (derived from the recipe name). This is similar to the release mode but the dev mode does not store this assignment anywhere. It is recomputed every time bob runs. So what directory will a common step in a multiPackage be assigned? This depends what is actually used, i.e. what is reachable from any root recipe and and in which order. Whatever is calculated first assigns the directory name of the common step. If you change the dependencies or their order it might have such an effect. The only guarantee for stable directory names across changes to the recipes is the release mode. |
But the release mode has some other disadvantages.. What do you think about having a checkoutDir property in the recipe which is used in the develop name formatter? |
We could possibly use the plain recipe name for checkout and build steps and only use the final package name in the packaging step. This would solve your particular problem. I don't think that having a dedicated checkoutDir property is a good idea. The drawback is that the following recipe (test.yaml):
would result in two checkout dirs that would be called "dev/src/test/1/..." and "dev/src/test/2/..." instead of having the real package name (test-foo, test-bar). Thoughts? How about checkout steps of other recipes that happen to do exactly the same? Currently they are done in one directory whose name is determined by the dependency order... |
thinking further you could have a recipe like this:
now I'd expect to get directories: src/test-alpha/1 so for checkoutStep directoryname should be plain recipe Name appended by Now That's why IMO it's more clear having a checkoutDir property:
Now directory is calculated as plain recipe name - checkoutDir if checkout dir is available. If it's not available use only plain-recipe name (you'll probably get: src/test/1 and src/test/2). And of course if you do something like this:
you'll get src/test-beta/1 and src/test-beta/2. |
I've pushed a preliminary implementation of plugins in my fork: https://github.com/jkloetzke/bob/tree/plugins In
Then you can add a |
Hi Jan, |
... bob jenkins push:
There is a jenkinsNameFormatter in the plugin but not in normal bob code? |
Nice. :-) I will have a look into the crash. The jenkins code was untested, obviously. I will have to rebase the branch on the latest master version and make some adjustments to clarify what APIs are available for plugins. This may take a couple of days... |
I assume I made a mistake merging the branches... Let me double check this before you start... :-/ |
I could reproduce the crash on my branch yesterday. Some parts of the Jenkins logic were simply not adapted. I will probably push an update this evening. Attention: I will rebase my branch because there are some conflicts with the current master too. Take care when merging with your stuff then. |
Hi @Rahu, I've merged the plugins branch after some final cleanup. I think this should solve you problem. Note that the type of hooks changed a little bit (no useless factory, just the plain function). If in doubt have a look at the example in Regards, |
Great! Thanks for your effort. 👍 |
Hi Jan,
I merged your commits this morning. I think db49f07 brought in a regression when using multiPackage recipes. Without this commit there is only one source directory and different build / dist directories.
Now there is a separate source directory for each multiPackage package. After reverting db49f07 it's building from the same src again.
BR
Ralf
The text was updated successfully, but these errors were encountered: