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

[Call-by-name] Backend migration tracking list #21065

Open
21 of 93 tasks
sureshjoshi opened this issue Jun 16, 2024 · 0 comments
Open
21 of 93 tasks

[Call-by-name] Backend migration tracking list #21065

sureshjoshi opened this issue Jun 16, 2024 · 0 comments
Assignees

Comments

@sureshjoshi
Copy link
Member

sureshjoshi commented Jun 16, 2024

This is a tracking list for the migrated backends.

The strategy at the moment is to roll out through the experimental backends, and also some of the more heavily used backends to get more visibility in case there are problems. I'd recommend that for the "more visible" backends, we start with linters/formatters - as those are probably the most hit goals typically.

How can I migrate a backend?

# Ensure the backend is enabled in pants.toml

pants migrate-call-by-name src/python/pants/backend/WHATEVER::

# Check for unnecessarily `implicitly`s and replace

pants fix fmt lint check test src/python/pants/backend/WHATEVER::` 

Unnecessary implicitlys

As it's a lot more work to have the migration code dig into each method call and determine whether there are un-passed parameters, the migration liberally adds **implicitly() to let the rule engine figure out missing parameters, where possible.

However, that's not free (and it's also visual clutter). So, during migration, reviewing each migrated function and checking whether all required parameters are passed would be nice.

It would be nice to have a type check or lint rule, and/or fix this at the migration level - but that would take some time.

Here is a concrete example of this in action: 23cdef5 - implicitly wasn't required.

I don't understand any of this

Yeah... Docs coming soon... Right now, the information is scattered around a number of discussions, issues, and PRs.

Fundamentally, my_foo = await Get(Foo, FooRequest, value) becomes my_foo = await some_function(value) or my_foo = await some_function(value, **implicitly()) - like normal function calling.


List generated by pants help-advanced backends

  • pants.backend.awslambda.python
  • pants.backend.build_files.fix.deprecations
  • pants.backend.build_files.fmt.black
  • pants.backend.build_files.fmt.buildifier
  • pants.backend.build_files.fmt.ruff
  • pants.backend.build_files.fmt.yapf
  • pants.backend.codegen.protobuf.lint.buf
  • pants.backend.codegen.protobuf.python
  • pants.backend.codegen.thrift.apache.python
  • pants.backend.docker
  • pants.backend.docker.lint.hadolint
  • pants.backend.experimental.adhoc
  • pants.backend.experimental.cc
  • pants.backend.experimental.cc.lint.clangformat
  • pants.backend.experimental.codegen.avro.java
  • pants.backend.experimental.codegen.protobuf.go
  • pants.backend.experimental.codegen.protobuf.java
  • pants.backend.experimental.codegen.protobuf.scala
  • pants.backend.experimental.codegen.thrift.apache.java
  • pants.backend.experimental.codegen.thrift.scrooge.java
  • pants.backend.experimental.codegen.thrift.scrooge.scala
  • pants.backend.experimental.cue
  • pants.backend.experimental.debian
  • pants.backend.experimental.docker.podman
  • pants.backend.experimental.go
  • pants.backend.experimental.go.debug_goals
  • pants.backend.experimental.go.lint.golangci_lint
  • pants.backend.experimental.go.lint.vet
  • pants.backend.experimental.helm
  • pants.backend.experimental.helm.check.kubeconform
  • pants.backend.experimental.java
  • pants.backend.experimental.java.debug_goals
  • pants.backend.experimental.java.lint.google_java_format
  • pants.backend.experimental.javascript
  • pants.backend.experimental.javascript.lint.prettier
  • pants.backend.experimental.kotlin
  • pants.backend.experimental.kotlin.debug_goals
  • pants.backend.experimental.kotlin.lint.ktlint
  • pants.backend.experimental.makeself
  • pants.backend.experimental.openapi
  • pants.backend.experimental.openapi.codegen.java
  • pants.backend.experimental.openapi.lint.openapi_format
  • pants.backend.experimental.openapi.lint.spectral
  • pants.backend.experimental.python
  • pants.backend.experimental.python.framework.django
  • pants.backend.experimental.python.framework.stevedore
  • pants.backend.experimental.python.lint.add_trailing_comma
  • pants.backend.experimental.python.lint.autoflake
  • pants.backend.experimental.python.lint.pyupgrade
  • pants.backend.experimental.python.lint.ruff.check
  • pants.backend.experimental.python.lint.ruff.format
  • pants.backend.experimental.python.packaging.pyoxidizer
  • pants.backend.experimental.python.typecheck.pyright
  • pants.backend.experimental.python.typecheck.pytype
  • pants.backend.experimental.rust
  • pants.backend.experimental.scala
  • pants.backend.experimental.scala.debug_goals
  • pants.backend.experimental.scala.lint.scalafix
  • pants.backend.experimental.scala.lint.scalafmt
  • pants.backend.experimental.sql
  • pants.backend.experimental.sql.lint.sqlfluff
  • pants.backend.experimental.swift
  • pants.backend.experimental.terraform
  • pants.backend.experimental.terraform.lint.tfsec
  • pants.backend.experimental.tools.semgrep
  • pants.backend.experimental.tools.trufflehog
  • pants.backend.experimental.tools.workunit_logger
  • pants.backend.experimental.tools.yamllint
  • pants.backend.experimental.typescript
  • pants.backend.experimental.visibility
  • pants.backend.google_cloud_function.python
  • pants.backend.plugin_development
  • pants.backend.project_info
  • pants.backend.python
  • pants.backend.python.lint.autoflake
  • pants.backend.python.lint.bandit
  • pants.backend.python.lint.black
  • pants.backend.python.lint.docformatter
  • pants.backend.python.lint.flake8
  • pants.backend.python.lint.isort
  • pants.backend.python.lint.pydocstyle
  • pants.backend.python.lint.pylint
  • pants.backend.python.lint.pyupgrade
  • pants.backend.python.lint.yapf
  • pants.backend.python.mixed_interpreter_constraints
  • pants.backend.python.providers.experimental.pyenv
  • pants.backend.python.providers.experimental.pyenv.custom_install
  • pants.backend.python.typecheck.mypy
  • pants.backend.shell
  • pants.backend.shell.lint.shellcheck
  • pants.backend.shell.lint.shfmt
  • pants.backend.tools.preamble
  • pants.backend.tools.taplo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant