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

MSVC runs out of template arguments #20

Open
ghost opened this issue Dec 12, 2018 · 5 comments
Open

MSVC runs out of template arguments #20

ghost opened this issue Dec 12, 2018 · 5 comments
Labels
wontfix This will not be worked on

Comments

@ghost
Copy link

ghost commented Dec 12, 2018

Interesting project, I was playing around with it for a bit, up until the point where I noticed that on MSVC the compiler does not like strings that are longer than 1023 characters (fatal error C1202: recursive type or function dependency context too complex).

This seems to be due to the fact that there can only be 2046 template arguments in a single declaration on MSVC (https://docs.microsoft.com/en-us/cpp/cpp/compiler-limits?view=vs-2017).

Is there any way this could be circumvented?

On GCC there is a compiler parameter for this it seems, on MSVC there is not.

@JustasMasiulis
Copy link
Owner

It is definitely possible to circumvent this by splitting the string characters into multiple types/blocks however I really do not think that anyone should be encrypting strings as long as that.

At 1000+ characters that really sounds more like a resource rather than a string and preprocessing it manually might bring noticeable improvements in compilation times.

People have already complained about compilation times and I managed to reduce the number of recursive functions to a single one and I reckon that adding the ability to encrypt such long sequences will introduce a compilation speed degradation.

Unless it is truly necessary for you I don't really have plans to implement this. Maybe toggle-able with a macro at best.

@JustasMasiulis JustasMasiulis added the wontfix This will not be worked on label Dec 25, 2018
@JustasMasiulis
Copy link
Owner

Implementation has changed since the start of this issue, but current string size limit should be around 8000 bytes.

@Laamy
Copy link

Laamy commented Feb 17, 2024

It is definitely possible to circumvent this by splitting the string characters into multiple types/blocks however I really do not think that anyone should be encrypting strings as long as that.

At 1000+ characters that really sounds more like a resource rather than a string and preprocessing it manually might bring noticeable improvements in compilation times.

People have already complained about compilation times and I managed to reduce the number of recursive functions to a single one and I reckon that adding the ability to encrypt such long sequences will introduce a compilation speed degradation.

Unless it is truly necessary for you I don't really have plans to implement this. Maybe toggle-able with a macro at best.

I would like to say that I've run into this issue while embedding a luau variant into my project

@Laamy
Copy link

Laamy commented Feb 17, 2024

got some super long strings

@ReactiioN1337
Copy link

got some super long strings

but that seems to be more of a design problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants