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

Recursive import causes StackOverflow #750

Open
ice1000 opened this issue Nov 29, 2022 · 10 comments
Open

Recursive import causes StackOverflow #750

ice1000 opened this issue Nov 29, 2022 · 10 comments
Labels
bug Something isn't working

Comments

@ice1000
Copy link
Member

ice1000 commented Nov 29, 2022

Just try.

@ice1000 ice1000 added the bug Something isn't working label Nov 29, 2022
@mio-19
Copy link
Contributor

mio-19 commented Dec 14, 2022

Should them be disallowed?

@ice1000
Copy link
Member Author

ice1000 commented Dec 14, 2022

Yes, I believe so :)

@ice1000
Copy link
Member Author

ice1000 commented Dec 14, 2022

This can be solved by adding a new phase in library import resolving.

@mio-19
Copy link
Contributor

mio-19 commented Dec 14, 2022

How about detecting them on the fly?

@imkiva
Copy link
Member

imkiva commented Dec 14, 2022

Do you mean import modules recursively in a library or import a file in SingleAyaFile?

@imkiva
Copy link
Member

imkiva commented Dec 14, 2022

Any stacktrace would be helpful

@ice1000
Copy link
Member Author

ice1000 commented Dec 14, 2022

Do you mean import modules recursively in a library or import a file in SingleAyaFile?

The former

@ice1000
Copy link
Member Author

ice1000 commented Dec 14, 2022

Any stacktrace would be helpful

I'll provide some later

@ice1000
Copy link
Member Author

ice1000 commented Dec 14, 2022

diff --git a/base/src/test/resources/success/nonsense/src/Nonsense/A.aya b/base/src/test/resources/success/nonsense/src/Nonsense/A.aya
new file mode 100644
index 000000000..44692bed3
--- /dev/null
+++ b/base/src/test/resources/success/nonsense/src/Nonsense/A.aya
@@ -0,0 +1 @@
+import Nonsense::B
\ No newline at end of file
diff --git a/base/src/test/resources/success/nonsense/src/Nonsense/B.aya b/base/src/test/resources/success/nonsense/src/Nonsense/B.aya
new file mode 100644
index 000000000..e8c2e0d9b
--- /dev/null
+++ b/base/src/test/resources/success/nonsense/src/Nonsense/B.aya
@@ -0,0 +1 @@
+import Nonsense::A

@ice1000
Copy link
Member Author

ice1000 commented Dec 14, 2022

Then, load nonsense/src/Nonsense/A.aya or nonsense/src/Nonsense/B.aya

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants