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

[FEATURE]: Lint Scala notebooks #1538

Open
1 of 9 tasks
Tracked by #1085
nfx opened this issue Apr 24, 2024 · 1 comment
Open
1 of 9 tasks
Tracked by #1085

[FEATURE]: Lint Scala notebooks #1538

nfx opened this issue Apr 24, 2024 · 1 comment
Labels
migrate/code Abstract Syntax Trees and other dark magic

Comments

@nfx
Copy link
Collaborator

nfx commented Apr 24, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Problem statement

Some of the ETL code that has to be migrated to UC is written in Scala. We need to speed that migration up. There's https://scalameta.org/docs/trees/guide.html + https://scalacenter.github.io/scalafix/, that is relatively stable.

We can limit the scope to:

  • spark.read.XXX("fs://prefixpath/")
  • df.write.save("fs://prefixpath/", ...)
  • spark.table("...")
  • spark.read.table("...")
  • df.write.saveAsTable("...")
  • spark.sql("...") with a call back to parent Python process for linting/rewrites
  • value inference of dbutils.widgets.get(X) from a supplied Map[String,String]
  • dbutils.fs. calls

Proposed Solution

Implement linters/fixers for Scala

Additional Context

No response

@nfx nfx added the migrate/code Abstract Syntax Trees and other dark magic label Apr 24, 2024
@nfx nfx added this to UCX Apr 24, 2024
@github-project-automation github-project-automation bot moved this to Triage in UCX Apr 24, 2024
@nfx nfx moved this from Triage to Quarter Backlog in UCX Apr 24, 2024
@nfx nfx moved this from Quarter Backlog to Month Backlog in UCX Jul 3, 2024
@ericvergnaud
Copy link
Contributor

Development wise, it might be more effective to leverage ANTLR with Scala grammar https://github.com/antlr/grammars-v4/blob/master/scala/Scala.g4. This would avoid running the scala linter as a (slow) child process and/or recreating all the plumbing.

@nfx nfx moved this from Month Backlog to Quarter Backlog in UCX Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
migrate/code Abstract Syntax Trees and other dark magic
Projects
Status: No status
Development

No branches or pull requests

2 participants