-
Notifications
You must be signed in to change notification settings - Fork 967
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
Feature: scala-only parser via fastparse
with cross platform
#552
Comments
You're welcome to discuss how to get started here if you need a forum for it. This would need someone else to maintain it though - I think we lack bandwidth to ideally-maintain even the Java version here (since the library is done-ish, there aren't a lot of urgent tasks, but we aren't actively moving anything forward). Handling all the corner cases in the same way as the original is quite difficult; much of the rationale of HOCON for better or worse is to handle a bunch of corner cases to optimize for the user instead of for implementation simplicity. An idea on the project is to port ALL the test cases from the Java version - possibly even working toward a TCK that multiple implementations could use. The weird cases of withFallback (merging configs) are downright mind-bending sometimes. Happy to try to answer questions. |
I would LOVE to have a standard pure-Scala implementation for HOCON. The main use-case is for cross-platform (jvm + js + native) tooling for Scalafmt/Scalafix. I think a 1:1 rewrite of the Java sources to Scala would a be a better approach than clean rewrite of the parser with fastparse. Ideally, the API should be 100% source compatible with the Java API so that it's truly a drop-in replacement even for the more "advanced" corners of the API like I personally don't have cycles to invest in this, however, but would be very grateful if someone stepped up to work on this 😄 |
@havocp thank you for "happy to try" :-)
|
@olafurpg |
Cool idea, adding some info:
Not sure if scala-hocon can live under the lightbend repository, it could imply we're working on it and maintaining it. Maybe it's fine though, but then who actively maintains it must be made clear, and also the quality must be a focus then -- otherwise it bounces back at us |
re: |
Yeah; Just wanted to reaffirm that if we're building "the official hocon library for scala-js/native" it should cover and work exactly like the main one |
I would love to have such a standard and do not waste effort in different projects.
is not a good idea IMO, and the required effort is enormous if you look at the actual codebase. What we can fairly ask to lightbend is a formalization of Having a formal definition of the spec would help a lot and splitting the implementation into "standard API" and "JVM specific details" would help even further (i.e. From my side shocon was developed specifically to support akka.js use-case, generalizing it to cover more projects could be possibly long process. |
fastparse
related:
The text was updated successfully, but these errors were encountered: