fs icon indicating copy to clipboard operation
fs copied to clipboard

resolve() needs real definition in the spec

Open jesup opened this issue 3 years ago • 2 comments

There's only a single line of normative definition for resolve() (which per other discussion here should be renamed). The non-normative language is fairly complete.

jesup avatar Aug 04 '22 19:08 jesup

While not perfect, https://fs.spec.whatwg.org/#entry-resolve (which the one line of definition you mention links to) does seem like a fairly complete definition? Of course I wouldn't expect any implementation to actually implement the algorithm as written (since that would probably be the least efficient way of implementing the operation), but I do believe the normative language does do a fairly complete job of describing the exact desired behavior.

mkruisselbrink avatar Aug 04 '22 19:08 mkruisselbrink

Aha. What surprised me was that "resolving" (invoked by reference there) wasn't in the resolve() definition -- and "resolving" is only referenced from resolve() (and from itself). Perhaps it should just be moved to resolve()...

jesup avatar Aug 06 '22 13:08 jesup

It seems reasonable to move it within the resolve() method algorithm since it's only referenced there... though I expect we may need to re-using this definition in some upcoming work, in which case we'd have to move the definition back to where it is now. I personally don't think it's worth the effort, but if you put up a PR to move the definition I'm happy to approve it.

a-sully avatar Jan 06 '23 23:01 a-sully