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

Change project configuration file format to YAML #50

Closed
navnavnav opened this issue Jul 21, 2022 · 3 comments
Closed

Change project configuration file format to YAML #50

navnavnav opened this issue Jul 21, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@navnavnav
Copy link
Member

Currently, project configuration files are expected to be in JSON format, with the filename being bloom.json.

JSON is nice, but I've recently come to accept that YAML would be a better format for the purpose of user-maintained configuration files.

So I'm going to be changing bloom.json to bloom.yaml, which should look something like this:

Default project configuration in JSON (bloom.json):

{
  "environments": {
    "default": {
      "debugTool": {
        "name": "atmel-ice",
        "releasePostDebugSession": true
      },

      "target": {
        "name": "avr8",
        "physicalInterface": "debug-wire"
      },

      "debugServer": {
        "name": "avr-gdb-rsp",
        "ipAddress": "127.0.0.1",
        "port": "1442"
      }
    }
  },

  "insight": {
    "enabled": true
  }
}

Default project configuration in YAML (bloom.yaml):

environments:
  default:
    debugTool:
      name: "atmel-ice"
      releasePostDebugSession: true

    target:
      name: "avr8"
      physicalInterface: "debug-wire"

    debugServer:
      name: "avr-gdb-rsp"
      ipAddress: "127.0.0.1"
      port: 1442

insight:
  enabled: true

I don't want this to be a breaking change, and I'd like to make the transition for current Bloom users as easy and seamless as possible. This is why I plan to have Bloom continue to check if a bloom.json file is present, in the absence of a bloom.yaml file, and if it is, automatically create a bloom.yaml file from the contents of the bloom.json file.

I'm hoping to include this in v0.11.0, but can't be certain about that ATM.

@navnavnav navnavnav added the enhancement New feature or request label Jul 21, 2022
@navnavnav navnavnav self-assigned this Jul 21, 2022
@navnavnav navnavnav added this to the v0.11.0 milestone Jul 23, 2022
@navnavnav
Copy link
Member Author

Have made good progress on this. Looks like it will be included in 0.11.0.

@navnavnav
Copy link
Member Author

Because JSON is a subset of YAML, there's no need to automatically create a YAML file from the contents of bloom.json - we can just use bloom.json in the absence of bloom.yaml, and ask the user to convert their old bloom.json whenever they can.

This means minimum disruption to current users when they upgrade to v0.11.0, and less work for me!

@navnavnav
Copy link
Member Author

Development work for this is done. Have tested Bloom with the new YAML format, as well as the old JSON format - both work without issue.

Changes have been merged into develop and should be released as part of v0.11.0. Closing this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant