-
Notifications
You must be signed in to change notification settings - Fork 8
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
StackOverflowError in Scanner.fetchToken #41
Comments
Using directives parser is currently not able to handle larger files, see VirtusLab/using_directives#41 Also improved BSP support. BSP mill-build modules should now be able to compile build files.
Using directives parser is currently not able to handle larger files, see VirtusLab/using_directives#41 Also improved BSP support. BSP mill-build modules should now be able to compile build files.
I see two problems:
|
Hi, try using val content = new String(os.read.bytes(buildSc), Charset.forName("UTF-8"))
val settings = new Settings(false, true)
val context = new Context(new ConsoleReporter(), settings)
val processor = new UsingDirectivesProcessor(context)
val usingDefs = processor.extract(content /* might need a .toArray here or sth similar */, true, false) A good source of inspiration would be to see how scala-cli handles using directives. e.g. https://github.com/VirtusLab/scala-cli/blob/9b4f317c11daa30aeb2649cdf8b9496304b2a39f/modules/build/src/main/scala/scala/build/preprocessing/ExtractedDirectives.scala This does not mean of course that this is not a bug. It seems that the Parser can't handle large amounts of whitespaces very well. |
Thanks for the hint! Isn't |
Using directives parser is currently not able to handle larger files, see VirtusLab/using_directives#41 Also improved BSP support. BSP mill-build modules should now be able to compile build files.
Thanks for fixing it. Can you please create a new release containing the fix? |
Using directives parser is currently not able to handle larger files, see VirtusLab/using_directives#41 Also improved BSP support. BSP mill-build modules should now be able to compile build files. # Conflicts: # scalalib/src/mill/scalalib/bsp/BspModule.scala
Using directives parser is currently not able to handle larger files, see VirtusLab/using_directives#41 Also improved BSP support. BSP mill-build modules should now be able to compile build files. # Conflicts: # scalalib/src/mill/scalalib/bsp/BspModule.scala
Using directives parser is currently not able to handle larger files, see VirtusLab/using_directives#41 Also improved BSP support. BSP mill-build modules should now be able to compile build files. # Conflicts: # scalalib/src/mill/scalalib/bsp/BspModule.scala
Using directives parser is currently not able to handle larger files, see VirtusLab/using_directives#41 Also improved BSP support. BSP mill-build modules should now be able to compile build files. # Conflicts: # scalalib/src/mill/scalalib/bsp/BspModule.scala
Using directives parser is currently not able to handle larger files, see VirtusLab/using_directives#41 Also improved BSP support. BSP mill-build modules should now be able to compile build files. # Conflicts: # scalalib/src/mill/scalalib/bsp/BspModule.scala
Using directives parser is currently not able to handle larger files, see VirtusLab/using_directives#41 Also improved BSP support. BSP mill-build modules should now be able to compile build files. # Conflicts: # scalalib/src/mill/scalalib/bsp/BspModule.scala
I see this error message when I try to parse this file: https://github.com/com-lihaoyi/mill/blob/8903f225fabf6d4605a6a8d5f741910fcc0ed256/build.sc
This is the code:
The text was updated successfully, but these errors were encountered: