unison icon indicating copy to clipboard operation
unison copied to clipboard

Docs on Unison Share no longer shorten names for data constructors

Open rlmark opened this issue 2 years ago • 3 comments

Mentioned in this slack thread

The website and Unison Share now render the full paths to data types whereas before it would abbreviate them the shortest possible path.

Here's an example on Unison share: https://share.unison-lang.org/@unison/website/code/main/latest/terms/learn/fundamentals/dataTypes/uniqueAndStructuralTypes

rlmark avatar Aug 31 '23 16:08 rlmark

@ChrisPenner can you take a look at this one? Or delegate to someone who you think knows this code better if that's not you.

CleanShot 2023-09-01 at 11 19 32@2x

The current logic for computing constructor names is now (as of this PR) supposed to be - take the FQN of the type, and the FQN of the constructor, and subtract the FQN of the type from the prefix of the constructor. So if the type is blah.foo.oog.Yay and the constructor is blah.foo.oog.Yay.Uno, the constructor will print as Uno.

This is how it's being done locally from the view command, but it looks like the local UI and share are using a different code path?

CleanShot 2023-09-01 at 11 22 06@2x

Looks good. But then check the local UI:

CleanShot 2023-09-01 at 11 21 52@2x

Also console doc rendering handles it okay (although it's stripping the FQN from the type, looks like):

CleanShot 2023-09-01 at 11 28 41@2x

pchiusano avatar Sep 01 '23 16:09 pchiusano

Not sure what's happening here but should be able to figure it out; my plate is a bit full at the moment so if I don't get to it in a couple weeks please ping me again :)

ChrisPenner avatar Sep 01 '23 19:09 ChrisPenner

This one is still happening even though #4330 is not.

aryairani avatar May 01 '24 19:05 aryairani