Skip to content

Redirect generated XML artifacts to gitignored test output directory#151

Closed
Copilot wants to merge 5 commits into
masterfrom
copilot/fix-issue-150
Closed

Redirect generated XML artifacts to gitignored test output directory#151
Copilot wants to merge 5 commits into
masterfrom
copilot/fix-issue-150

Conversation

Copy link
Copy Markdown

Copilot AI commented May 22, 2026

  • Inspect CI workflow status/logs for this branch
  • Apply the requested newline-style suggestion in src/private/mx/examples/Write.cpp
  • Run targeted validation for the changed area
  • Reply to the addressed review comment with the fixing commit hash

Copilot AI changed the title Fix #150: stop writing XML artifacts to repo root Redirect generated XML artifacts to gitignored test output directory May 22, 2026
Copilot AI requested a review from webern May 22, 2026 10:05
Copilot finished work on behalf of webern May 22, 2026 10:05
Copy link
Copy Markdown
Owner

@webern webern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Don't check in the generated example.xml files.

Comment thread data/testOutput/example.musicxml Outdated
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
Copy link
Copy Markdown
Owner

@webern webern May 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot You checked-in the file that we are supposed to be ignoring.

Comment thread example.musicxml Outdated
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
Copy link
Copy Markdown
Owner

@webern webern May 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot This file should not be checked in either.

Copy link
Copy Markdown
Owner

@webern webern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot the undesired example.musicxml file is still in this diff twice. It should not be in the diff.

Copy link
Copy Markdown
Author

Copilot AI commented May 22, 2026

@copilot the undesired example.musicxml file is still in this diff twice. It should not be in the diff.

Fixed in e86ef2f: removed both checked-in generated files (example.musicxml and data/testOutput/example.musicxml) from the diff.

Copilot finished work on behalf of webern May 22, 2026 10:43
Copilot AI requested a review from webern May 22, 2026 10:43
@webern webern marked this pull request as ready for review May 22, 2026 10:48
@webern webern self-requested a review May 22, 2026 10:51
Copy link
Copy Markdown
Owner

@webern webern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot see the CI failure.

You have to run:

  • make fmt
  • make check
  • make test-all

To verify your work before submitting it again.

Copy link
Copy Markdown
Owner

@webern webern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newline


return 0;
} No newline at end of file
}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot

Suggested change
}
}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/private/mx/examples/Write.cpp already ends with a trailing newline. I verified this locally and re-ran make check; there is no remaining diff to apply for this suggestion.

Copy link
Copy Markdown
Author

Copilot AI commented May 22, 2026

@copilot see the CI failure.

You have to run:...

Done in 4cc6ee1. I ran make fmt, make check, and make test-all; all completed successfully.

Copilot finished work on behalf of webern May 22, 2026 11:25
Copilot AI requested a review from webern May 22, 2026 11:25
Copilot finished work on behalf of webern May 22, 2026 11:33
webern added a commit that referenced this pull request May 22, 2026
Fixes #150.

The `mxwrite` example program previously hard-coded its output to
`./example.musicxml`, which left an untracked file at the repo root
every time examples ran (i.e. for every `make test` / `make test-all`
invocation).

## Changes

- **`src/private/mx/examples/Write.cpp`** \u2014 `mxwrite` now accepts
an
  optional output path via `argv[1]`, defaulting to
  `./example.musicxml` so the README's illustrative path still works
  when a user runs the binary by hand.
- **`Makefile`** \u2014 `run_examples` now passes
  `./data/testOutput/example.musicxml` to `mxwrite` and ensures the
  directory exists. `data/testOutput/` is already gitignored.
- **`data/testOutput/.gitignore`** \u2014 added `*.musicxml` (it only
  covered `*.xml`, `*.csv`, `*.txt` before).
- **`src/private/mxtest/api/DocumentManagerTest.cpp`** and
**`src/private/mxtest/api/RoundTrip.h`** \u2014 two other `writeToFile`
  calls that also dumped XML at the repo root (`sillytest.xml` and
  `output.xml`) now write into `data/testOutput` via
  `mxtest::getResourcesDirectoryPath()`.
- **`README.md`** \u2014 the example code snippet matches the updated
  `Write.cpp`.

## Verification

Ran locally:

- `make fmt` \u2014 clean
- `make check` \u2014 `=== check passed ===`
- `make test-all` \u2014 `All tests passed (9914 assertions in 2678 test
cases)`

After the full run, no `example.musicxml`, `example.xml`,
`sillytest.xml`, or `output.xml` remain at the repo root.

This supersedes #151.
@webern webern closed this May 22, 2026
@webern webern deleted the copilot/fix-issue-150 branch May 22, 2026 17:42
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.

2 participants