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

Cannot add_source_file to package sets #378

Open
g-arjones opened this issue Jul 27, 2022 · 3 comments
Open

Cannot add_source_file to package sets #378

g-arjones opened this issue Jul 27, 2022 · 3 comments
Labels

Comments

@g-arjones
Copy link
Contributor

Changes introduced in #335 (particularly c7b291c) completely broke Autoproj::PackageSet$add_source_file because the init.rb scripts are no longer called before the description files are loaded.

@2maz Would you please explain why you moved ws.load_if_present(pkg_set, pkg_set.local_dir, "init.rb") from Autoproj::Ops::Configuretion#load_package_set to Autoproj::Ops::Configuretion#update_package_sets?

@doudou @2maz Can you suggest a fix?

@g-arjones g-arjones added the bug label Jul 27, 2022
@doudou
Copy link
Member

doudou commented Nov 18, 2022

Hey. Sorry... Did leave that to rot

The change was needed as far as I remember because source.yml can declare cross-package-set ports. I.e. we need to load descriptions to make sure the init.rb files are loaded in the right order

The right fix would IMO to only load the dependency bits of the source.yml during the update and then load the full description later (and forbid declaring dependencies in the source files that are loaded with add_source_file)

@doudou
Copy link
Member

doudou commented Nov 18, 2022

(my hunch is confirmed by #335's message)

@pierrewillenbrockdfki
Copy link
Contributor

Currently working around this by putting Autoproj.current_package_set.load_description_file at the end of the init.rb, while evaluating options for overriding branches depending on the value of a configuration_option.

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

No branches or pull requests

3 participants