unisonweb / unison

A friendly programming language from the future
https://unison-lang.org
Other
5.68k stars 266 forks source link

monadic / selective names lookup for parsing & pretty-printing #3218

Open aryairani opened 2 years ago

aryairani commented 2 years ago

As codebases are growing, it's increasingly intractable to pre-load all names, even with history excluded. (This applies to both UCM and Share.)

We want to just load the names that are needed for parsing (for specific lexed identifiers) or rendering (for specific dependencies).

pchiusano commented 2 years ago

I thought Share already did something fancy for this... no?

aryairani commented 2 years ago

Err, right, good point. Share does something fancy for this (not positive if it covers all use cases, though it may), but UCM doesn't yet.

mitchellwrosen commented 2 years ago

Share does load all names in order to construct the pretty-print environment.

aryairani commented 2 weeks ago

@ChrisPenner This is already done right?

ChrisPenner commented 2 weeks ago

@aryairani only on Share, we still load all the whole codebase root in ucm. Project roots will help, but ucm doesn't do anything sophisticated like Share does

aryairani commented 2 weeks ago

Gotcha, thanks.