Skip to content

Remove unused code - #14589

Merged
T-Gro merged 10 commits into
dotnet:mainfrom
nojaf:remove-unused-code
Jan 13, 2023
Merged

Remove unused code#14589
T-Gro merged 10 commits into
dotnet:mainfrom
nojaf:remove-unused-code

Conversation

@nojaf

Copy link
Copy Markdown
Contributor

In light of #14567, I believe to have found some code that is unused.

These are top-level functions that are unused in the file they are defined and are not part of the signature.

In some cases, I did update the signature file. (For example in Result.toSeq in FSharp.Core, because the value was missing in src/FSharp.Core/result.fsi it was considered unused).

And in sformat.fs I did shuffle some functions a bit because depending on the COMPILER define value the code was considered to be unused or not. This file is used both in FCS and FSharp.Core.

@nojaf
nojaf requested a review from a team as a code ownerJanuary 11, 2023 15:52

@KevinRansomKevinRansom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I love this change, but I want to understand whether the reordering of the baseline file is benign.
Also there is too much churn in that file to see whether something interesting was removed.

So if we can hold off on merging for a short while.

Comment threadsrc/Compiler/Optimize/Optimizer.fs Outdated
Comment threadtests/FSharp.Core.UnitTests/SurfaceArea.fs
@T-Gro

Copy link
Copy Markdown
Member

I want to nominate this for PR of the year.

@KevinRansom

Copy link
Copy Markdown
Contributor

I'm gonna do the baselines for this differently, so the big delta here is fine for now.

@KevinRansomKevinRansom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Now I think I understand what is going on with the baseline.

Comment threadsrc/FSharp.Core/eventmodule.fsi Outdated
Comment threadsrc/FSharp.Core/fslib-extra-pervasives.fsi Outdated
Comment threadsrc/FSharp.Core/result.fsi Outdated
Comment threadsrc/FSharp.Core/result.fsi Outdated
Comment threadsrc/FSharp.Core/eventmodule.fsi Outdated
@nojaf

Copy link
Copy Markdown
ContributorAuthor

@T-Gro I've addressed all the remarks. This one is good to go.

@T-Gro
T-Gro merged commit cb106cf into dotnet:mainJan 13, 2023
@nojaf
nojaf deleted the remove-unused-code branch January 13, 2023 12:05
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants

@nojaf@T-Gro@KevinRansom@vzarytovskii