Skip to content

Remove -b flag for C# parser#846

Open
LakatosMark1 wants to merge 1 commit intoEricsson:feature/csharp_pluginfrom
LakatosMark1:fix-820-csharp-parser
Open

Remove -b flag for C# parser#846
LakatosMark1 wants to merge 1 commit intoEricsson:feature/csharp_pluginfrom
LakatosMark1:fix-820-csharp-parser

Conversation

@LakatosMark1
Copy link
Copy Markdown
Collaborator

@LakatosMark1 LakatosMark1 commented Mar 29, 2026

Refactor C# parser to extract target DLLs from .csproj and populate build graph

Resolves #820

@mcserep mcserep changed the title Issue #820 Remove -b flag for C# parser Apr 14, 2026
@mcserep mcserep self-requested a review April 14, 2026 09:05
@mcserep mcserep added Plugin: C# Issues related to the parsing and presentation of C# projects. Kind: Refactor 🔃 labels Apr 14, 2026
@mcserep mcserep added this to Lab and Roadmap Apr 14, 2026
@github-project-automation github-project-automation Bot moved this to In progress in Roadmap Apr 14, 2026
@github-project-automation github-project-automation Bot moved this to In progress in Lab Apr 14, 2026
@mcserep mcserep linked an issue Apr 14, 2026 that may be closed by this pull request
@mcserep mcserep added this to the Upcoming Release milestone Apr 14, 2026
void addSource(const std::string& filepath_, bool error_);
const std::vector<std::string>& path_ //,
); //const std::string& buildPath_
//void addSource(const std::string& filepath_, bool error_);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Remove commented out code from codebase.

bool CsharpParser::parseProjectBuildPath(
const std::vector<std::string>& paths_,
const std::string& buildPath_)
const std::vector<std::string>& paths_ //,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Remove commented out comma.

Console.WriteLine(p);
allFiles.AddRange(GetSourceFilesFromDir(p, ".cs"));
// We find all .csproj files
var csprojFiles = Directory.GetFiles(p, "*.csproj", SearchOption.AllDirectories);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Project file processing should be solved with the proper tooling, the Microsoft.CodeAnalysis.CSharp.Workspaces NuGet package exists for that.

We can reuse this from #847.

assemblies_base = GetSourceFilesFromDir(_buildDirBase, ".dll");


IEnumerable<string> assemblies_base = GetSourceFilesFromDir(_buildDirBase, ".dll"); //loading basic dlls
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we really need to collect the DLL paths here?

Comment on lines +202 to +204
// Find the DLL name and append a | to the filename.
string target = fileToTargetDll.ContainsKey(tree.FilePath) ? fileToTargetDll[tree.FilePath] : "Unknown.dll";
WriteLine((visitor.FullyParsed ? "+" : "-") + tree.FilePath + "|" + target);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why do we print the results in such an odd format?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Kind: Refactor 🔃 Plugin: C# Issues related to the parsing and presentation of C# projects.

Projects

Status: In progress
Status: In progress

Development

Successfully merging this pull request may close these issues.

Refactor the -b flag of the C# plugin

2 participants