Skip to content

adding whole-project loading#5002

Open
Saizan wants to merge 1 commit into
haskell:masterfrom
Saizan:hie-bios-0.20
Open

adding whole-project loading#5002
Saizan wants to merge 1 commit into
haskell:masterfrom
Saizan:hie-bios-0.20

Conversation

@Saizan

@Saizan Saizan commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Updates hls to hie-bios 0.20 and takes advantage of its new LoadMode to add "whole project" components loading: loads all components specified in the cradle from the start, regardless of which files are open.

TODO:

  • Updated docs in doc/configuration.md
  • Add tests

@Saizan Saizan force-pushed the hie-bios-0.20 branch 2 times, most recently from d0b01cc to b29e37a Compare July 5, 2026 11:27
@Saizan Saizan marked this pull request as ready for review July 5, 2026 11:27
@Saizan

Saizan commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

@fendor let me know if you have a better field name than componentsLoading

Comment on lines -45 to 46
<*> o .:? "sessionLoading" .!= sessionLoading defValue
<*> loadingPref o
<*> o .:? "linkSourceTo" .!= linkSourceTo defValue

@Kleidukos Kleidukos Jul 6, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should definitely not deprecate sessionLoading without warning first. :) Happy to make sure that the next HLS announcement on the Haskell blog includes it.

@fendor

fendor commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Can we open an issue proposing what the changes to HLS are?

@fendor fendor left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Changes look good to me, primarily a question of UX and naming

Comment thread hls-plugin-api/src/Ide/Types.hs Outdated
@Saizan

Saizan commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Created issue #5005 to document design

@Saizan Saizan requested a review from fendor July 7, 2026 10:22

@Kleidukos Kleidukos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good work so far @Saizan, I'm seeing a couple of things that I'd like you to clarify:

  1. There seems to be both needed-only and only-needed, is that desired? We should probably stick with multi: needed-only.

  2. You seem to have introduced the double usage of multipleComponents (full words, plural) and multiComponent (abbreviated, singular). Please stay with multipleComponents:

              [ show @String old_value ++ " (deprecated)"
        ==>   | old_value <- ["singleComponent","multiComponent"]
              ]
  1. I feel like there is a similar disparity between "session loading" and "component loading" but maybe I'm wrong?

@Saizan

Saizan commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@Kleidukos thanks for catching that, decided to give a name to these strings, see last commit.

renamed "sessionLoading" config to "componentsLoading"
deprecated old values in favor of: "single", "multi: needed-only", "multi: whole-project"
@Saizan Saizan requested a review from Kleidukos July 13, 2026 14:54
@Kleidukos

Copy link
Copy Markdown
Member

@Saizan Do you know if we can expect an increase in memory consumption when enabling this feature? Would you mind sharing memory profiles before / after your patch? Not a blocker but this could certainly bring light on stuff we could work on afterwards. :)

@Saizan

Saizan commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

@Kleidukos you mean compared to multi: needed-only but when we actually need the whole project, or something else?

Or would you like to know how much memory extra "unneeded" components amount to?

I would assume it's going to be fairly dependent on their composition, do you have a project in mind we could take as a benchmark? Otherwise I suppose the natural choice is HLS itself.

@Kleidukos

Copy link
Copy Markdown
Member

@Saizan Starting with HLS itself is not a bad choice at all! Basically what I'm interested in is what the average end-user can expect in terms of resource consumption after upgrading, with a project that has multiple packages.

Or would you like to know how much memory extra "unneeded" components amount to?

Something like this, yes. Basically if you have a workflow of "navigating a codebase with multiple components / packages in a project, what does that change for the end-user in terms of reactivity and does that blow up their memory usage". :)

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