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

fix: remove duplicated Type Extensions #950

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

MangelMaxime
Copy link
Contributor

Fix #941

It seems like they all have the same DeclarationLocation which can make sense if this is just syntax sugar.

@nojaf
Copy link
Collaborator

nojaf commented Jan 2, 2025

@goswinr could you check if this PR solves your problem?

@MangelMaxime
Copy link
Contributor Author

To test the change locally, I did something like that:

Adding this code to F# Formatting code, for example at src/FSharp.Formatting.Literate/Literate.fs

module Test =

	type ``[]``<'T>  with //Generic Array
	        member inline xs.First
	            with get () =
					failwith ""
	            and set (v: 'T) =
					failwith ""

and generated the docs locally.

Doing so, I was able at the time to reproduce both the issue and the fix.

@nojaf
Copy link
Collaborator

nojaf commented Jan 2, 2025

Would like to Goswin (or anyone really) to try this one the actual project.
There were some changes in the compiler with get/set the past years, so would like some confirmation this solves the reported problem.

@goswinr
Copy link
Contributor

goswinr commented Jan 2, 2025

@MangelMaxime thank you for fixing this. Your test case looks just like mine. Did you test on net9? @nojaf I am using the latest net9 skd.

@MangelMaxime
Copy link
Contributor Author

@nojaf In theory, my test was a reproduction but I just tested it locally against @goswinr original project:

Before (online version)

CleanShot 2025-01-02 at 17 38 36@2x

After (local with the fix)

CleanShot 2025-01-02 at 17 51 58@2x

I don't know why the styling is broken in the in the after version, this is perhaps caused by because i run fsbuild in build mode and host a standalone http server, so I don't respect the baseUrl expected (http://192.168.0.197:8080/ VS https://goswinr.github.io/ArrayT). For example, I see some .js file failing to load because of that.

But I didn't touch the CSS in this PR so I didn't spend time trying to fix this "non issue".

Copy link
Collaborator

@nojaf nojaf left a comment

Choose a reason for hiding this comment

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

Alright, thank you!

@nojaf nojaf merged commit 7b20db4 into fsprojects:main Jan 3, 2025
3 checks passed
@MangelMaxime MangelMaxime deleted the fix/duplicate_member_extension branch January 3, 2025 08:01
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.

One extension members shows four times in docs.
3 participants