Skip to content

Dumping profiles while using a profile generates non-sense output #3009

@manchoz

Description

@manchoz

Describe the problem

While using profiles – especially in the case of a default one has been specified – --dump-profile generates a wrong output, in the sense that it completely forgets about the currently selected profile.

To reproduce

❯ ls
sketch_mar22a.ino  sketch.yaml
❯ cat sketch_mar22a.ino
#include <Arduino_JSON.h>

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}
❯ cat sketch.yaml
profiles:
  default:
    fqbn: arduino:renesas_portenta:portenta_c33
    platforms:
      - platform: arduino:renesas_portenta (1.1.0)
    libraries:
      - Arduino_JSON (0.2.0)

default_profile: default
❯ arduino-cli compile
Downloading platform arduino:renesas_portenta@1.1.0...
Downloading index: package_index.tar.bz2 downloaded
arduino:renesas_portenta@1.1.0 downloaded
Installing platform arduino:renesas_portenta@1.1.0...
Downloading tool arduino:bossac@1.9.1-arduino5...
arduino:bossac@1.9.1-arduino5 downloaded
Installing tool arduino:bossac@1.9.1-arduino5...
Downloading tool arduino:dfu-util@0.11.0-arduino5...
arduino:dfu-util@0.11.0-arduino5 downloaded
Installing tool arduino:dfu-util@0.11.0-arduino5...
Downloading library Arduino_JSON@0.2.0...
Arduino_JSON@0.2.0 downloaded
Installing library Arduino_JSON@0.2.0...
The library Arduino_JSON has been automatically added from sketch project.
Sketch uses 109584 bytes (5%) of program storage space. Maximum is 2097152 bytes.
Global variables use 20756 bytes (3%) of dynamic memory, leaving 502868 bytes for local variables. Maximum is 523624 bytes.
❯ arduino-cli compile --dump-profile
profiles:
  portenta_c33:
    fqbn: arduino:renesas_portenta:portenta_c33
    platforms:
      - platform: arduino:renesas_portenta (1.1.0)

Expected behavior

When using a profile, --dump-profile should output the configuration of the current profile.

Arduino CLI version

arduino-cli Version: git-snapshot Commit: 869fced Date: 2025-08-27T15:20:15Z

Operating system

macOS

Operating system version

ProductVersion: 26.0 BuildVersion: 25A354

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the nightly build
  • My report contains all necessary details

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions