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
argstruct name clash #2810
Comments
FTR the argstruct-specific patch would look something like:
The vmod change is only included for vmod_debug here, if solved this way, vmod_directors would also need adjustment |
Bugwash decision: Warn about missing $Prefix |
bugwash conclusion: write up the $Prefix inconsistencies |
How about something like this:
I's pretty crude, but it gets the job done, and makes for consistent namespace as far as the vmod writer is concerned. |
@phk lgtm |
bugwash: I still want to do the writeup |
SummaryHere's the overview of the various symbol name formats we are using in vmodtool. Details with examples from vmod_debug are given below. The symbol names we are using can be summarized as:
@bsdphk 's patch moves the argstruct to category 2), so this would solve the problem. One particular issue which I came across is that, for the example of vmod blob with So my suggestion is to move all symbols to category 1) and default Details
|
bugwash: @bsdphk wants to look into vmodtool.py: we might want backwards compat macros and will continue during a future bugwas |
I believe this can be closed now. |
as discussed on IRC, argstructs still clash |
Related to #2810 Conflicts: lib/libvmod_debug/vmod.vcc
Fixed that. Done now ? |
yes, thank you |
Related to varnishcache#2810 Conflicts: lib/libvmod_debug/vmod.vcc
when two vmods implement the same class with optional arguments to the constructor, the argstruct symbols clash. I guess this would also happen with any other symbols by the same name.
Example:
from
https://code.uplex.de/uplex-varnish/varnish-objvar/blob/master/src/vmod_taskvar.rst
https://code.uplex.de/uplex-varnish/varnish-objvar/blob/master/src/vmod_constant.rst
The workaround is to use different
$Prefix
, but we should clarify if this is really what$Prefix
is intended for. Example: https://code.uplex.de/uplex-varnish/varnish-objvar/commit/6089fd5d1ba22ced780b69f19e3cfe4cc7d2d54dWe could also prefix the vmod name to just the argstruct, which would require changes to all vmods using optional arguments. But as of now, that's most likely not too many, so if we want to make such a breaking change, now is probably a good time.
The text was updated successfully, but these errors were encountered: