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

v6.0 #2800

Merged
merged 34 commits into from
Mar 27, 2023
Merged

v6.0 #2800

merged 34 commits into from
Mar 27, 2023

Conversation

nojaf
Copy link
Contributor

@nojaf nojaf commented Mar 27, 2023

Contains all the work so far for #2709.
Going forward, we will only stabilize v6 and we should be going to beta rather soon.

dawedawe and others added 30 commits March 17, 2023 18:14
* First stab at logging.
--verbosity d should be the same as in the past
--verbosity n should be pretty quiet

* Make use of Serilog

* improve test specificity

* add log messages about count of processed files

* Use interpolated strings for all logger functions.
Change some logs to be error logs.
…le (#2728)

* Extend logging and verbosity options (#2693)

* First stab at logging.
--verbosity d should be the same as in the past
--verbosity n should be pretty quiet

* Make use of Serilog

* improve test specificity

* add log messages about count of processed files

* Use interpolated strings for all logger functions.
Change some logs to be error logs.

* remove MultilineBlockBracketsOnSameColumn & ExperimentalStroustrupStyle from src/

* remove MultilineBlockBracketsOnSameColumn & ExperimentalStroustrupStyle from Rider.md

* remove MultilineBlockBracketsOnSameColumn & ExperimentalStroustrupStyle from Configuration.fsx

* remove orange (use with caution) marker from fsharp_multiline_bracket_style
* Move FormatConfig into Fantomas.Core namespace.

* Remove unused opens.
* Cursor inside node.

* Add support for a floating cursor.

* Add some thoughts on resolving the cursor with multiple defines.

* Expose cursor API in Fantomas.Client.

* Add CHANGELOG entries.
* Implement stroustrup for copy-and-update expressions

* Implement changes for anonymous records

* Add some unit tests to demonstrate differences

* Renamed files to match setting names. Expand on comparison in styles example.

---------

Co-authored-by: nojaf <[email protected]>
* Remove experimental prefix from stroustrup bracket style

* Update docs

* Remove experimental_stroustrup, Configuration.fsx tweaks.

---------

Co-authored-by: nojaf <[email protected]>
* Expose SyntaxOak API

* Add changelog entry for 6.0 alpha 2.

---------

Co-authored-by: nojaf <[email protected]>
…xpressions (#2746)

* Add new setting

* Add test

* Implement new setting

* Add setting-specific tests to its own file

* Fix an issue with applying to lambdas

* Fix issue when applying to LetBang and AndBang

* Fix all failing tests, some cleanup

* Remove invalid tests, some more cleanup

* Rename some helpers

* temp

* Cleanup, add test

* Rename setting

* Use local Fantomas.Core reference for Configuration.fsx.

* Rename some things and fix assertion

* Update docs

* Simplify isStroustrupStyleExpr

* Rename test file to match setting name.

* Add additional test to highlight that settings don't affect each other.

---------

Co-authored-by: nojaf <[email protected]>
* Remove F# option from public API.

* Apply suggestions from code review

Co-authored-by: dawe <[email protected]>

---------

Co-authored-by: dawe <[email protected]>
* Remove AnonRecordFieldNode

* Consolidate a lot of logic

Introduce active pattern to join implementation for Record & AnonRecords
Consolidate some more logic to fix an edge case
Consolidate a bit more
Remove unintentional change, cleanup

Refactor to remove active pattern

* Add ExprCopyableRecordNode subclass to better separate concerns

* Clean up a bit

* Remove a type, rename some others

* Inline some one-off functions

* Format CodePrinter.fs

* Add some additional XML documentation.

---------

Co-authored-by: nojaf <[email protected]>
* Add Spectr.Console.

* Remove unused CodeFormatException.

* Update Fantomas.Tests

* Continue on error

* Some regex logic.

* Remove duplicate ignore check.
Print one-line if only one file was formatted.
* Remove genCrampedFields inside genMultilineRecord.

* Remove ExprAnonRecordNode for now.

* Expr.AnonStructRecord!
* Update dotnet tools.

* First draft of the upgrade guide.

* Update docs/docs/end-users/UpgradeGuide.md

Co-authored-by: dawe <[email protected]>

* Fix navigation.

---------

Co-authored-by: dawe <[email protected]>
* Update GeneratingCode.fsx to use the Oak model.

* Remove unnecessary code.

* Apply suggestions from code review

Co-authored-by: dawe <[email protected]>

---------

Co-authored-by: dawe <[email protected]>
* Always process folder recursive.

* Remove last traces of recurse.
Add UpgradeGuide.md entry.
* Move profile logic to Format.fs and use Spectre

* Rename ProfileInfos -> ProfileInfo
Don't touch Fantomas.Core

* Reuse the oks and unchanged lists from partitionResults for the call to reportProfileInfos

* Show shorter time format.

* Bundle parameters to formatContentAsync and formatFileAsync in a single record FormatParams

* Move profile logic to Format.fs and use Spectre

* Rename ProfileInfos -> ProfileInfo
Don't touch Fantomas.Core

* Remove ProcessResult and use FormatResult for everything

* centralize exception creation and fix wording

* Final nits

---------

Co-authored-by: nojaf <[email protected]>
* Fix record type generation for stroustrup types with members

* Reuse with keyword if it exists, add tests
* Fix handling of AppExpr with a single stroustrup record

* Add some more tests

* Refactor to handle record applications after other args

* Add specific settings for new feature

* Fix rebase issue

* Remove extra setting for stroustrup record application expressions

* Fix rebase issues
* Manually deserialize FormatDocumentResponse.

* Apply suggestions from code review

Co-authored-by: dawe <[email protected]>

---------

Co-authored-by: dawe <[email protected]>
…2781)

* Extract Stroustrup for final list argument into a separate setting.

* Rename genArray to genArrayOrList.
* Fix issue with Stroustrup member indents

* Move unindent closer to indent
…pStyle as well. (#2795)

* EndsWithSingleListApp & EndsWithDualListApp are enbled by both ExperimentalElmish or IsStroustrupStyle.

* Renamed test file.
nojaf and others added 4 commits March 17, 2023 18:23
* Remove StrictMode from Config

* Only clean the Release folder.

* Fix typo in UpgradeGuide.md
* Refactor processing of multiple defines into separate module.

* Improve correctness of the behavior.

* Fix remaining Util tests.

* Format MultipleDefineCombinations.fs

* Apply suggestions from code review

Co-authored-by: dawe <[email protected]>

* Remove redundant elif

* Implement Equals and GetHashCode.

---------

Co-authored-by: dawe <[email protected]>
* Return string from FormatASTAsync api.

* Add identifier in code sample.

* Add release notes.
@nojaf nojaf merged commit 7293a94 into main Mar 27, 2023
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.

6 participants