Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to:
I am having a crack at implementing this feature.
Right now the user can specify a path using the
--developer
options (arguably would be better as--source(s)-from
) taken as the current directory by default, to use with an already existing EC file.The developer mode would append a
-dev
(maybe.dev
could be better?) to the version originally found in the EC, and the EB will skip the fetch/patch/extension steps and, instead of extracting an existing source during theextract_step
will copy the content of the specified source path to the build directory.The name of the copied directory will be set to match
cfg['start_dir']
if set, or will keep its original name and configure its own start directoryTested by compiling the develop branch of the following code-bases using the respective 2023a EC file as a base
While implementing this, i had several reflections/ideas that will requires some design choices on what we would want this feature to enable and potential problems with the current implementation
--developer
(and possibly some minor changes to howstart_dir
is being handled.self.src
that should be set by the fetch_stepEC with multiple sources
The
-dev
suffix to the version will make the version appear as greater then the modified one but lower then the next numerically higher one, so it should not screw up with version checks in the easyblock (and i think having the develop version appear as greater should be the default behavior for this scenario).I was thinking the most general way to avoid this problem might be to:
develop
options to point to the dir to be copiedextract_step
develop
-dev
prefix as the developer could just set his ownversionsuffix
The current implementation is probably the easiest for the developer perspective (they would only need to add
--developer
to the command, but this might be limited and not work in many scenario.The more complete approach might add a level of difficulty in that the developer will need to understand the EC file and add the relevant parts.
There is also the fact that this build process would need to download some existing sources without using them just to get the information to reproduce the expected
builddir
layout (not sure if there is a way around this).An intermediate approach could be to allow
--developer
to define a list of paths and each of them would replace one source in the same order as they are defined in the EC (would act at the level of thefetch_step
.The downside would be that the developer would need to be careful about the order of the specified sources
I am not sure which would be the best way to move forward (or if there is some other solution I have not tried/thought of) so I am leaving this as a draft for discussion