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

Avoid altering score on write #1560

Merged
merged 3 commits into from
May 11, 2023

Conversation

TimFelixBeyer
Copy link
Contributor

@TimFelixBeyer TimFelixBeyer commented May 9, 2023

We copy the score object early to avoid modifying it when calling .write("musicxml", *)
See #1557

@jacobtylerwalls

@coveralls
Copy link

coveralls commented May 9, 2023

Coverage Status

Coverage: 93.1% (-0.003%) from 93.103% when pulling 560cd47 on TimFelixBeyer:patch-1 into 8d5cce8 on cuthbertLab:master.

@mscuthbert
Copy link
Member

Looks good -- there was one additional deepcopy still there. Just patched it up. Will merge (or @jacobtylerwalls can) if I didn't introduce any lint errors/bugs.

@jacobtylerwalls
Copy link
Member

Super! In a minute I'll push up a regression test (given that this regressed once already).

@jacobtylerwalls jacobtylerwalls linked an issue May 11, 2023 that may be closed by this pull request
@jacobtylerwalls jacobtylerwalls changed the title Avoid altering score on write #1557 Avoid altering score on write May 11, 2023
TimFelixBeyer and others added 3 commits May 11, 2023 16:40
makeRests was called inPlace before copies were made.

See cuthbertLab#1557
flat Part was going to need an additional deepcopy.  Now, should not need one.
@jacobtylerwalls jacobtylerwalls merged commit 8a8c167 into cuthbertLab:master May 11, 2023
@jacobtylerwalls
Copy link
Member

Thanks for the diagnosis and PR!

@TimFelixBeyer TimFelixBeyer deleted the patch-1 branch May 12, 2023 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Saving a stream as musicxml alters the stream
4 participants