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

Purge some more hslogger #2770

Merged
merged 2 commits into from Mar 10, 2022
Merged

Conversation

michaelpj
Copy link
Collaborator

@michaelpj michaelpj commented Mar 9, 2022

At this point we only really need it for hie-bios.

@fendor
Copy link
Collaborator

fendor commented Mar 9, 2022

@michaelpj We can purge it from hie-bios easily as well, the logic HLS uses, doesn't even use hslogger.

At this point we only really need it for `hie-bios`.
Copy link
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

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

Pretty cool, LGTM!

Comment on lines +141 to +142
LogUsingExtensions fp exts -> "Using extensions for " <+> viaShow fp <> ":" <+> pretty exts
LogGetIdeas fp -> "Getting hlint ideas for " <+> viaShow fp
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
LogUsingExtensions fp exts -> "Using extensions for " <+> viaShow fp <> ":" <+> pretty exts
LogGetIdeas fp -> "Getting hlint ideas for " <+> viaShow fp
LogUsingExtensions fp exts -> "Using extensions for" <+> viaShow fp <> ":" <+> pretty exts
LogGetIdeas fp -> "Getting hlint ideas for" <+> viaShow fp

@michaelpj
Copy link
Collaborator Author

I was planning to just teach hie-bios to use the same kind of co-log based infrastructure as we are using now, it probably should be loggging!

Copy link
Collaborator

@eddiemundo eddiemundo left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +128 to +133
data Log
= LogShake Shake.Log
| LogApplying NormalizedFilePath (Either String WorkspaceEdit)
| LogGeneratedIdeas NormalizedFilePath [[Refact.Refactoring Refact.SrcSpan]]
| LogGetIdeas NormalizedFilePath
| LogUsingExtensions NormalizedFilePath [String] -- Extension is only imported conditionally, so we just stringify them
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the fields should be banged, although it probably doesn't matter since our current recorders will force the fields anyway, and there are composite types that prevent some forcing, and we probably will never buildup huge thunks of NormalizedFilePath or the composite types, and I noticed I didn't bang the wrapper constructor fields everywhere anyway.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I just added StrictData to the module, which is probably a sensible default these days anyway.

@michaelpj michaelpj requested a review from drsooch as a code owner March 10, 2022 11:25
@michaelpj michaelpj merged commit 388abc3 into haskell:master Mar 10, 2022
July541 pushed a commit to July541/haskell-language-server that referenced this pull request Mar 30, 2022
* Purge some more hslogger

At this point we only really need it for `hie-bios`.

* Add StrictData to Hlint plugin
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.

None yet

3 participants