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

Allow for Perl modules being part of other, already installed Perl modules #2386

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

Flamefire
Copy link
Contributor

(created using eb --new-pr)

Copy link
Contributor

@lexming lexming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following the discussion with @Micket about this PR, we agreed that the goal of this PR is good but the resulting easyconfigs are very confusing. A list of extensions such as

    ('Foo::Name1', '1.00', {
        'source_tmpl': 'Potato-%(version)s.tar.gz',
    }),
    'Bar::Name2',
    'Qux::Name3',

makes it impossible to know what is actually happening with those extensions without sources. How are those installed? from which sources? Since those extensions without sources can be provided by any previous extension and, moreover, with a totally different name, it is very difficult to track.

We would like a different approach that allows installing multiple Perl modules from a single source with the following syntax

    ('Foo-and-Bar', '1.23', {
        'modulename': ['Foo', 'Bar'],
        'source_urls': ['https://cpan.metacpan.org/authors/id/w/t/WTF'],
    }),

Please check the PR Flamefire#6

It is not complete (lacks tests) but it works. It enhances the sanity_check of PerlModule to allow multiple elements in modulename. Extensions with a list of modules can then have any arbitrary name. What do you think?

@Flamefire
Copy link
Contributor Author

How are those installed? from which sources?

I was following the design of the R ECs, so we have something like this already. But I see your point, it is just not easy to solve.

We would like a different approach that allows installing multiple Perl modules from a single source with the following syntax

This is more difficult than it looks. E.g. the --skip is supposed to "import" a module and not install it if that succeeds. The proposed solution needs to enhance also that to support multiple modulenames. This seems to require major changes to the framework. I like the approach though.

As an alternative: Can we add a new PerlModule EC param included_modules which are then only sanity checked for import without affecting anything else?

@akesandgren
Copy link
Contributor

included_modules sounds like a good first approach.

@Flamefire
Copy link
Contributor Author

Just evaluated that approach. It likely needs a change to the framework because we (probably) want to have those listed in the Module extension list, don't we?
Currently we have this code: exts_list = ','.join(['-'.join(ext[:2]) for ext in self.cfg.get_ref('exts_list')])

My idea would be to extract that into a function the Perl-EasyBlock can override. See easybuilders/easybuild-framework#3697

@Flamefire
Copy link
Contributor Author

Updated easybuilders/easybuild-framework#3697
Anything else new here?

@Flamefire
Copy link
Contributor Author

With easybuilders/easybuild-framework#4716 and easybuilders/easybuild-framework#4690 this easyblock can append the modulenames to the extension list

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

Successfully merging this pull request may close these issues.

5 participants