Support running custom targets locally when using Remote Run

Open
#5,399 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
build-system, cli

Research direction

Start at the pio remote run -t custom_target entry point and trace the filtering that occurs before local cmd_run; the issue identifies AddCustomTarget() as the source of the target. Determine how custom targets can be passed through for local execution, then verify that they run locally or on both machines as intended.

Written by the indexing model from the issue text.

Description

Hi,
I'm adding custom (platform) targets via AddCustomTarget() and encountered inconsistent behavior.

Issue
  • When running pio remote run -t custom_target, they are locally filtered out because they don't belong to predefined categories such as clean or fs family.
  • As a result, custom targets are silently ignored in the local execution (maybe they ran on remote).
Expected

Custom targets are

  1. executed locally, or
  2. on both machines.
Question
  1. Is there a way to mark a custom target as “allowed for local execution”?
  2. Can the filtering logic be bypassed or extended so that custom targets are passed through to local cmd_run?

I think forcing remote option (-r) is not the solution I'm looking for.
Thank you.

Dominant language
Python
Stars
9.6k
Forks
916
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from platformio/platformio-core

All issues in platformio/platformio-core

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.