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

Can't create Plugin #418

Closed
cossio opened this issue Aug 2, 2023 · 2 comments · Fixed by #420
Closed

Can't create Plugin #418

cossio opened this issue Aug 2, 2023 · 2 comments · Fixed by #420

Comments

@cossio
Copy link
Contributor

cossio commented Aug 2, 2023

julia> using PkgTemplates: @with_kw_noshow, @plugin, FilePlugin
julia> @plugin struct Changelog <: FilePlugin
           file::String = "CHANGELOG.md"
       end
ERROR: UndefVarError: `PkgTemplates` not defined
Stacktrace:
 [1] top-level scope
   @ ~/.julia/packages/PkgTemplates/LISo2/src/plugin.jl:67

Am I doing something wrong?

Julia Version 1.9.2
[14b8a8f1] PkgTemplates v0.7.38
@oxinabox
Copy link
Collaborator

oxinabox commented Aug 8, 2023

you need to have:
using PkgTemplates: PkgTemplates, @with_kw_noshow, @plugin, FilePlugin

because the @plugin macro assumed that the PkgTemplates is defined where it is called.
We could fix this by interpolating all the functions generated in the macro, but it would take a bit.

@cossio
Copy link
Contributor Author

cossio commented Aug 8, 2023

For now I think it'd be fine to just mention it in the docs. #420

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 a pull request may close this issue.

2 participants