Skip to content

Conversation

MarcMazas
Copy link

No description provided.

@olamy
Copy link
Member

olamy commented Jul 12, 2025

Do you have a stack trace of the ConcurrentModificationException?

@MarcMazas
Copy link
Author

MarcMazas commented Jul 12, 2025 via email

@MarcMazas
Copy link
Author

I added a commit to fix erroneous excludes management.

if (excludes != null && !excludes.isEmpty()) {
String[] exclStrs = excludes.toArray(new String[excludes.size()]);
scanner.setIncludes(exclStrs);
scanner.setExcludes(exclStrs);

This comment was marked as resolved.

Copy link
Author

Choose a reason for hiding this comment

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

I do too but did not find a way to create a second pull request while the first one was still opened...

This comment was marked as outdated.

This comment was marked as resolved.

@MarcMazas
Copy link
Author

Do you have a stack trace of the ConcurrentModificationException?

You should get one easily with:

                  <compilerArgs>
                    <arg>-nologo:true</arg>
                    <arg>-nowarn:0414</arg>
                    <arg>-utf8output:true</arg>
                    <arg>-target:exe</arg>
                    <arg>-out:${project.artifactId}.exe</arg>
                  </compilerArgs>

@slachiewicz slachiewicz requested a review from Copilot October 5, 2025 17:40
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a ConcurrentModificationException that occurred when modifying a map while iterating over it, and includes several improvements to compiler argument handling and option tweaks for the C# compiler.

  • Fixed ConcurrentModificationException by using a temporary HashMap to collect modifications during iteration
  • Enhanced debug option handling to support different debug modes (full, pdbonly, etc.)
  • Corrected various compiler argument processing logic and fixed a bug where excludes were incorrectly set as includes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

} else {
args.add("/debug-");
}
// plugin parameter is no the same as the compiler option! so replaced
Copy link

Copilot AI Oct 5, 2025

Choose a reason for hiding this comment

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

Corrected spelling of 'no' to 'not'.

Suggested change
// plugin parameter is no the same as the compiler option! so replaced
// plugin parameter is not the same as the compiler option! so replaced

Copilot uses AI. Check for mistakes.

Comment on lines +397 to +402
// plugin parameter is no the same as the compiler option! so replaced
// if (config.isDebug()) {
// args.add("/debug+");
// } else {
// args.add("/debug-");
// }
Copy link

Copilot AI Oct 5, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider removing commented-out code rather than leaving it in the codebase. If this code might be needed for reference, document why it was removed in a comment.

Suggested change
// plugin parameter is no the same as the compiler option! so replaced
// if (config.isDebug()) {
// args.add("/debug+");
// } else {
// args.add("/debug-");
// }
// plugin parameter is not the same as the compiler option, so debug handling was removed.

Copilot uses AI. Check for mistakes.

String k = arr[0];
v = arr[1];
compilerArguments.put(k, v);
// compilerArguments.put(k, v);
Copy link

Copilot AI Oct 5, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider removing commented-out code rather than leaving it in the codebase.

Suggested change
// compilerArguments.put(k, v);

Copilot uses AI. Check for mistakes.

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.

3 participants