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

feat(api): rename specProcessed to specResolved #985

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thomcsmits
Copy link
Collaborator

Fix # Change api name based on #978 (comment)
Toward #

Change List

  • Change name of api subscribe event specProcessed to specResolved

Checklist

  • Ensure the PR works with all demos on the online editor
  • Unit tests added or updated
  • Examples added or updated
  • Documentation updated (e.g., added API functions)
  • Screenshots for visual changes (e.g., new encoding support or UI change on Editor)

thomcsmits added a commit to gosling-lang/gosling-website that referenced this pull request Oct 19, 2023
@manzt
Copy link
Member

manzt commented Oct 19, 2023

The input spec is modified to have default values filled in, and some of the users' incorrectly-specified properties are fixed. Some parts of the spec are not touched by the program (e.g., when values are already specified by users, so no need to add default values), which I think is what @thomcsmits was referring to by "it is just partially processed".

Hmm hard for me to visualize the "state" of the spec at this moment. Similar to our discussion in the developer meeting, perhaps it would be useful to think of the spec in stages of transformations (e.g., a different type for each stage) and then name the event based on the stage.

My only comment about both specProcessed and specResolved is that these both are ambiguous and don't capture the "partial" nature of the processing. Imagine a pipeline of processing steps in the compiler:

inputSpec ---(pass 1)--> specStage1 --(pass 2)--> specStage2 --(pass 3)--> finalSpec

Let's say right now we emit the specStage2 version of the spec. What would we call events publishing the finalSpec or specStage1? My suggestion was to try to come up with a more specific name than either specProcessed or specResolved that appropriately captures the state of the data being sent.

I don't think we need to bikeshed about processed vs resolved, both are totally fine for me. Since the only current subscriber for this event is alt-gosling, maybe we could use something like alt-gosling:specProcessed in lieu of codifying the names/types for the steps of the Gosling compiler.

@sehilyi
Copy link
Member

sehilyi commented Oct 26, 2023

I am down with alt-gosling:specProcessed given that alt-gosling is the only use case for this at the moment.

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