Open
Conversation
TarikViehmann
requested changes
Dec 17, 2024
| ; See the License for the specific language governing permissions and | ||
| ; limitations under the License. | ||
|
|
||
| (defmodule MAIN (export deftemplate time)) |
Contributor
There was a problem hiding this comment.
Why is this necessary?
Shouldn't this be up to the user (e.g., to re-define the main module once and then exporting whatever is necessary)?
I have not worked with modules yet, but it seems if this export here is necessary, then this needs to be a policy across all plugins.
| context->env_name_.c_str()); | ||
| for (const auto &f : init_files_) { | ||
|
|
||
| clips::Defmodule *main_module = clips::FindDefmodule(env.get_obj().get(), "MAIN"); |
Contributor
There was a problem hiding this comment.
Can you also document this behavior in the clips-executive meta-package: https://github.com/fawkesrobotics/ros2-clips-executive/blob/master/clips_executive/doc/plugins/file_load_plugin.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
If files declare a module, the focus is switched to this module. That means that rules, functions, etc. of subsequently loaded files are also loaded into that module. Therefore we switch the focus in the file load plugin to MAIN before loading a new file to prevent this unwanted side effect.