-
Notifications
You must be signed in to change notification settings - Fork 203
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
Use a standard configuration format that other tools can reuse #58
Comments
My 2c, nothing novel just some thoughts
|
2 more cents, no more novelty. The Clang community has settled on a format and quite a lot of tooling has sprung up around it. I would love if we could do the same in the scala community. It may make sense to re-use the same keys they use for our shared bits of information and then just enrich the file with additional information we need to help us interoperate with existing tooling. https://sarcasm.github.io/notes/dev/compilation-database.html My other thought, I would like for this file to contain enough information to be able to determine if artifacts built with these settings are still valid or if they need to be rebuilt. I don't know all of the variables besides the scala source code, maybe it is just classpath, compiler flags, and scalac version? |
I know I brought this up in another ticket, but I'll reiterate here, as it's more relevant. If the file format needs to be read by other tools, JSON is too heavyweight a dependency to require, as it becomes largely inaccessible to shell scripting (which is a particular use-case for Bloop). JSON can be read with The existing key/value format works very well for shell scripting, as To throw another idea into the pot, but one I'm by no means wedded to, the I have no idea about HOCON, but anything which requires complex parsing immediately makes the format less useful. Even changing from a single In summary, please don't introduce complexity you don't need! |
HOCON desugars to JSON so any JSON is valid HOCON, and a HOCON parser can read HOCON and emit JSON. Not sure if that helps related to the above points, just trying to fill in some of the blanks regarding HOCON, not an argument for or against. |
This commit is quite big. The reason it's so big is because in order to ditch java properties and use the json configuration file format, I had to redesign some of the parts of bloop's configuration handling that left me unsatisfied. This includes ditching parallel collections to load the configuration files, and reusing as much as possible the configuration classes within the `Project` definition. It also includes moving unnecessary loggers to the test project, and removing how elapsed time and `verbose` loggers are handled (given the use of `Task`, neither implementation was viable). Lastly, it changes `Interpreter.execute` to use `Task`, so that we only use `Await` once in the program: at the end, once we've captured the control flow within a task. Fixes #58.
This commit is quite big. The reason it's so big is because in order to ditch java properties and use the json configuration file format, I had to redesign some of the parts of bloop's configuration handling that left me unsatisfied. This includes ditching parallel collections to load the configuration files, and reusing as much as possible the configuration classes within the `Project` definition. It also includes moving unnecessary loggers to the test project, and removing how elapsed time and `verbose` loggers are handled (given the use of `Task`, neither implementation was viable). Lastly, it changes `Interpreter.execute` to use `Task`, so that we only use `Await` once in the program: at the end, once we've captured the control flow within a task. Fixes #58.
This commit is quite big. The reason it's so big is because in order to ditch java properties and use the json configuration file format, I had to redesign some of the parts of bloop's configuration handling that left me unsatisfied. This includes ditching parallel collections to load the configuration files, and reusing as much as possible the configuration classes within the `Project` definition. It also includes moving unnecessary loggers to the test project, and removing how elapsed time and `verbose` loggers are handled (given the use of `Task`, neither implementation was viable). Lastly, it changes `Interpreter.execute` to use `Task`, so that we only use `Await` once in the program: at the end, once we've captured the control flow within a task. Fixes #58.
This commit is quite big. The reason it's so big is because in order to ditch java properties and use the json configuration file format, I had to redesign some of the parts of bloop's configuration handling that left me unsatisfied. This includes ditching parallel collections to load the configuration files, and reusing as much as possible the configuration classes within the `Project` definition. It also includes moving unnecessary loggers to the test project, and removing how elapsed time and `verbose` loggers are handled (given the use of `Task`, neither implementation was viable). Lastly, it changes `Interpreter.execute` to use `Task`, so that we only use `Await` once in the program: at the end, once we've captured the control flow within a task. Fixes scalacenter/bloop#58.
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v2...v3) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This is a ticket to keep track of collaboration with other tools in the Scala commuinty. Bloop should settle on a configuration format that can be read by any tool (from LSP servers, scalafix to other build tools).
As this format doesn't exist, we should probably pioneer one. Another possibility is to reuse
.eclipse
configuration files -- that are widely supported by Eclipse, Intellij and vscode (not natively, but some plugin extensions do) -- or directly generate.idea
configuration files. However, we may want to encode more information in the file and it's not clear yet whether eclipse configuration files allow it.Supporting all this configuration files is easy, so we may also consider understanding all of these so that people that heavily use Intellij and rely on sbt-idea to import their projects do not need to run
install
in the build. This would mean there's a standard, preferred configuration file but bloop can also understand others. This is a nitpick and it's only UX work, so this won't happen anytime soon. But it's a thing to keep an eye on.My ideal format is json because it can be edited and it's readable (unlike protobuf). This json format should have also a library that provides bincompat readers and writers so that other tools that want to read/write from it only need to depend on the library and use it.
When bloop is public, I'll start summoning people up in this ticket so that we converge to one solution and explore how useful this file would be, and how it could help make better tooling.
The text was updated successfully, but these errors were encountered: