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

[Fix] Replace comment types #4785

Merged
merged 2 commits into from Jan 22, 2024
Merged

Conversation

arkamar
Copy link
Contributor

@arkamar arkamar commented Jan 20, 2024

Rspamd fails to start with lua 5-1 without this change.

Bug: https://bugs.gentoo.org/922522
Fixes: b189c9f ("[Minor] lua_maps docs: apply formatting")
Fixes: #4784

@arkamar
Copy link
Contributor Author

arkamar commented Jan 20, 2024

Hmmm, I am not sure if the fix is correct as it most probably breaks docs formatting, right? Anyway, nested comments are not allowed, see 3rd point, section 7.1, lua 5.1 manual. But it seems we can use [=[ syntax in outer comments to fix this. What do you think?

@fatalbanana
Copy link
Member

If we would double up those comments it would still be rendered as a comment in docs (./doc/doxydown/doxydown.pl -l lua < lualib/lua_maps.lua).

+-- -- Then this function will look for opts.my_map parameter and try to replace it's with

Rspamd fails to start with Lua-5.1 because long comment does not allow
nesting, see [1]. This change replaces it to short comments in order to
fix the issue but preserves this part as comment in docs.

[1] https://www.lua.org/manual/5.1/manual.html#7.1

Bug: https://bugs.gentoo.org/922522
Fixes: b189c9f ("[Minor] lua_maps docs: apply formatting")
Fixes: rspamd#4784
@arkamar
Copy link
Contributor Author

arkamar commented Jan 22, 2024

@fatalbanana good idea, thanks! I did the proposed change, plus one small typo fix.

@arkamar arkamar changed the title [Fix] Remove nested comment [Fix] Replace coment types Jan 22, 2024
@arkamar arkamar changed the title [Fix] Replace coment types [Fix] Replace comment types Jan 22, 2024
@vstakhov vstakhov merged commit e7b3d77 into rspamd:master Jan 22, 2024
1 check passed
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.

[BUG] rspamd v3.8.0 fails to start with lua 5-1 (works with lua 5-3 and lua 5-4)
3 participants