Skip to content

Conversation

@Numpsy
Copy link
Contributor

@Numpsy Numpsy commented May 18, 2025

refs #231

As discussed in #231 I believe that it did this before the change to use the new MS solution parser, and changing it to return guids instead doesn't seem right.

Also added a new test with a solution that contains a folder with just files (no project items)

|> Seq.map (fun p -> parseItem p)
|> List.ofSeq,

folder.Files
Copy link
Contributor Author

Choose a reason for hiding this comment

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

folder.Files can be null here, hence the Option.ofObj stuff to turn such a case into an empty collection

let solutionItem = solutionContents.Items[0]

Expect.equal solutionItem.Guid (Guid("8ec462fd-d22e-90a8-e5ce-7e832ba40c5d")) "Should have the epxcted guid"
Expect.equal solutionItem.Name "\\Solution Items\\" "Should have the expected folder name"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was going to ask about the slashes here as a separate bug - Ionide is displaying them in the solution explorer and I don't think it should e.g.

image

but then the new slnx format does seem to include them in the actual solution file:

image

So - not sure if they should be filtered here, or returned to the caller and changed for display purposes higher up?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

and that's made me realise that Visual Studio displays nested folders as a tree
image

Whereas Ionide displays them alongside each other

image

I suppose that's a separate bug though

Copy link
Collaborator

Choose a reason for hiding this comment

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

IIRC we had some tree support in the past - I wonder if the odd slash usage/naming is throwing that off. Agree that's a separate issue though.

Since VS is stripping the slashes for UI purposes, we could/should as well. The values here almost look like xpath path expressions, except the slashes are the wrong direction...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IIRC we had some tree support in the past

I tried downgrading Ionide to 7.22.0 and the nesting works in that version, so I'll have a look at that next week.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like version 0.68.0 returned the folders as a tree, and now it's returning a flat list as it appears in the solution file

@Numpsy Numpsy marked this pull request as ready for review May 18, 2025 20:27
Copy link
Member

@TheAngryByrd TheAngryByrd left a comment

Choose a reason for hiding this comment

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

thank you!

@TheAngryByrd TheAngryByrd merged commit 65a4143 into ionide:main Jun 1, 2025
3 checks passed
@Numpsy
Copy link
Contributor Author

Numpsy commented Jun 1, 2025

Looks like this PR and the other one together have caused a test failure, I'll have a look at fixing the expected results

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