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

Resolve formatting inconsistency between positron-python extension and main Positron codebase #5838

Closed
juliasilge opened this issue Dec 19, 2024 · 2 comments
Assignees
Labels
area: builds Issues related to Builds category. enhancement New feature or request lang: python

Comments

@juliasilge
Copy link
Contributor

We have two upstream repos that we incorporate into this repo at a regular cadence, both the Python extension and the Code - OSS repo. The upstream projects have different sets of formatting rules for the same kinds of files. We believe we want to maintain the same formatting as the upstream projects because if we did not, managing these upstream merges would be much more difficult. The current state we are dealing with is that if you have the main positron workspace open and make any changes to files in the positron-python extension, the formatting rules from the main workspace are applied to those files. If you check in that change, the linter fails.

My current workaround here is to:

  • make changes to files in the positron-python folder, build, iterate, etc
  • save the files (maybe close VS Code here, to avoid making any other edits using the workspace settings)
  • run npm run format-fix in positron/extensions/positron-python to fix the formatting of the files I just edited

Another workaround people have shared with me that can be used for very small changes is to run "File: Save without Formatting" in VS Code on such files. 😩

This is a pain point for all of us, but new team members are tripping over it in a bad way. Let's find a way to resolve this inconsistency. Is a multi-root workspace the way to go?

For reference:

@juliasilge juliasilge added enhancement New feature or request area: builds Issues related to Builds category. lang: python labels Dec 19, 2024
@juliasilge
Copy link
Contributor Author

@juliasilge juliasilge added this to the 2025.02.0 Pre-Release milestone Jan 6, 2025
@isabelizimm isabelizimm self-assigned this Jan 10, 2025
isabelizimm added a commit that referenced this issue Jan 23, 2025
…nsion (#6104)

Adds a multiroot workspace config file to resolve Positron Python
formatting conflicts. This will respect the different formatters from
`positron` and `positron-python` within a single workspace, so we no
longer will have to work in multiple windows!

### Release Notes

<!--
Optionally, replace `N/A` with text to be included in the next release
notes.
The `N/A` bullets are ignored. If you refer to one or more Positron
issues,
these issues are used to collect information about the feature or
bugfix, such
as the relevant language pack as determined by Github labels of type
`lang: `.
  The note will automatically be tagged with the language.

These notes are typically filled by the Positron team. If you are an
external
  contributor, you may ignore this section.
-->

#### New Features

- N/A

#### Bug Fixes

- Addresses #5838 by respecting formatting in both `positron` and
`positron-python` workspaces


### QA Notes

<!--
  Add additional information for QA on how to validate the change,
  paying special attention to the level of risk, adjacent areas that
  could be affected by the change, and any important contextual
  information not present in the linked issues.
-->

N/A, an opt-in dev experience
@testlabauto
Copy link
Contributor

Verified Fixed

Positron Version(s) : Main on 1/24/25
OS Version          : OSX

Test scenario(s)

Verified based on examination of commit.

Link(s) to TestRail test cases run or created:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: builds Issues related to Builds category. enhancement New feature or request lang: python
Projects
None yet
Development

No branches or pull requests

3 participants