Skip to content

Allow macros to be found by evaluating expressions#1454

Merged
paciorek merged 1 commit into
develfrom
macro-namespace-support
Jun 1, 2024
Merged

Allow macros to be found by evaluating expressions#1454
paciorek merged 1 commit into
develfrom
macro-namespace-support

Conversation

@perrydv
Copy link
Copy Markdown
Contributor

@perrydv perrydv commented May 31, 2024

Macros are currently an internal and unused feature, but we have substantial development going on with them for future releases. We need macros to be found by namespace operators. This PR enables something much more general, which is to search for possible macros by evaluating arbitrary expressions, which should include namespace operators. It is not easy to write a test for finding a macro in a namespace, but everything else and an indirect test on namespaces works and is added to test-macros.R. Macros are still disabled by default (nimbleOptions("enableModelMacros") is FALSE), so the chances of this PR breaking something should be small.

@paciorek
Copy link
Copy Markdown
Contributor

paciorek commented Jun 1, 2024

@perrydv ok to merge given the test failures are unrelated?

@perrydv
Copy link
Copy Markdown
Contributor Author

perrydv commented Jun 1, 2024

Yes.

@paciorek paciorek merged commit c639351 into devel Jun 1, 2024
@paciorek paciorek deleted the macro-namespace-support branch June 1, 2024 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants