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

Bug Report - Settings file is regenerated by Windows Terminal on launch #2173

Closed
allykzam opened this issue Jul 31, 2019 · 4 comments
Closed
Labels
Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@allykzam
Copy link

Environment

Windows build number: Microsoft Windows [Version 10.0.18362.267]
Windows Terminal version (if applicable): 0.2.1831.0

Steps to reproduce

  1. Open the profiles.json used by Windows Terminal for settings, make formatting changes, and save them
  2. Open a new Windows Terminal window

Expected behavior

Since the profiles.json file (appears to be) intended for user manipulation, its formatting and layout should be left as-is after a user changes it. This can be important for users who manage their settings via a git dotfiles repository, e.g. all the dupes of #1567.

Actual behavior

When a new Windows Terminal window is opened, the profiles.json file is re-written, restoring the original formatting, and in some cases changing setting values. In my settings, I had a profile's acrylicOpacity value set to 0.9; after Windows Terminal reflows the settings, the same value has changed to 0.89999997615814209.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jul 31, 2019
@zadjii-msft
Copy link
Member

This should be improved/fixed by #754, whenever that lands.

@zadjii-msft zadjii-msft added the Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. label Jul 31, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jul 31, 2019
@allykzam
Copy link
Author

allykzam commented Aug 2, 2019

@zadjii-msft I read through the comments on #754, and followed that to the spec you're working on with #1258, and left a comment there. It doesn't sound like the current spec actually solves this issue, and would just make it less frequent?

If I submit a feature request for it, is it possible to have some kind of "I'm a power user, stop touching my settings file" setting that disables Windows Terminal writing to my profiles.json?

@zadjii-msft
Copy link
Member

One thing we're working on with #1258 is not re-serializing the user's settings. So we're going to have both

  1. dramatically fewer cases where we write the file back out (only when a dynamic profile is added)
  2. When we do write the file back out, we'll write out the original json object.

The goal with 2 is that even if we need to update the settings, we won't be re-serializing things, causing the re-formatting and re-ordering. Hopefully the json will remain in the original state it was in, with only the new keys inserted into the right place.

If you really wanted, you could even disable the dynamic profile generators entirely, which would prevent anything from ever modifying the settings.

In a post #1564 world, this will obviously be harder to prevent when using the settings UI, but you could always just not use it.

@allykzam
Copy link
Author

allykzam commented Aug 2, 2019

The second point wasn't super clear from my reading of the spec, thank you very much for the clarification. Updating a json file without changing its formatting sounds like some complicated voodoo code, so I wish all of you good luck in making that happen. :)

The configuration documentation in here has been great so far, so I suspect I'd be fine working without the new settings UI. Even so, at least it would be expected that well okay, I touched a setting with their UI, it's probably going to reflow my settings file. Feels much nicer than it just happening constantly for seemingly no reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

2 participants