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

Index compiler plugins #865

Open
adpi2 opened this issue Jan 19, 2022 · 0 comments
Open

Index compiler plugins #865

adpi2 opened this issue Jan 19, 2022 · 0 comments

Comments

@adpi2
Copy link
Member

adpi2 commented Jan 19, 2022

Motivation

Compiler plugins are fully part of the Scala library ecosystem. Some of them like better-monadic-for are widely used and much valuable.

This should be better reflected in Scaladex, by indexing compiler plugins, enabling users to search them.

Identified obstacles

1. Binary version

Currently compiler plugins are filtered out by the ScalaVersion.Parser because their artifacts binary version is the full Scala version. Example: the binary version of kind-projector_2.13.8 is 2.13.8 instead of 2.13.

We need to accept those binary versions but we should not make them appear in the search filters or in the artifacts dropdown list.

2. Platform type

It would be good to introduce a new Platform type for compiler plugins in which the full Scala version would be the platform version.

However how can we accurately detect if an artifact is an compiler plugin or not from the pom file?

Indeed some compiler plugins binary version is the full Scala version but not all of them (ex: better-monadic-for_2.13). Also some other artifacts (not compiler plugins) may use the full Scala version as well. Compiler plugins depend on the compiler artifact but some other artifacts do as well.

Implementation Guidelines

  1. Find a way to accurately detect if an artifact is a compiler plugin and validate it on the current set of libraries in Scaladex
  2. Introduce a ScalaCompilerPlugin subclass of Platform
  3. Index a compiler plugin from its pom files
  4. Adapt the front page, search page and project page to include the new compiler plugin platform.

Expectations

  1. The number of false positive (false compiler plugins) should be low
  2. The indexing of a compiler plugin should be tested
  3. The search filters and project page drop-downs should be usable (not too verbose).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant