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

docs(effect): add section for recurse api and clean up wording #2364

Merged
merged 1 commit into from
Jan 27, 2024

Conversation

dmaskasky
Copy link
Collaborator

Summary

Add section for recurse api and clean up wording

Check List

  • [o] yarn run prettier for formatting code and docs (prettier updates unrelated files)

Copy link

vercel bot commented Jan 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
jotai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 26, 2024 10:09pm

Copy link

codesandbox-ci bot commented Jan 25, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 722c6c5:

Sandbox Source
React Configuration
React TypeScript Configuration
React Browserify Configuration
React Snowpack Configuration
Next.js Configuration
Next.js with custom Babel config Configuration
React with custom Babel config Configuration

- **Supports Recursion:**
Recursion is supported with `set.recurse` for both sync and async use cases, but is not supported in the cleanup function.

<!-- prettier-ignore -->
Copy link
Member

Choose a reason for hiding this comment

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

What happens without it?
I think it's effective until the end. Is there a way to enable it back?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm sorry, I don't understand what you are asking.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If you are asking about prettier, prettier breaks the html layout for details arrows.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I was asking about prettier. Maybe give up <details> for now?

Copy link
Collaborator Author

@dmaskasky dmaskasky Jan 26, 2024

Choose a reason for hiding this comment

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

I think it's effective until the end.

Oh sorry, I missed a </details> above. I fixed it now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I was asking about prettier. Maybe give up <details> for now?

I think the reader experience is good by initially hiding this additional information.

HTML elements in MDX is valid. The <!-- prettier-ignore --> only affects the next line. If removed, prettier adjusts the line spacing and indentation until MDX readers no longer parse this as HTML. Its too bad prettier doesn't have good support for this.

Copy link
Member

Choose a reason for hiding this comment

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

The <!-- prettier-ignore --> only affects the next line.

Oh, I see!

@dmaskasky
Copy link
Collaborator Author

Something's up with the Vercel deployment, could you take a look?

@dai-shi
Copy link
Member

dai-shi commented Jan 25, 2024

[10:47:43.151] Running build in Washington, D.C., USA (East) – iad1
[10:47:43.259] Cloning github.com/pmndrs/jotai (Branch: effect-recurse-docs, Commit: 1b28e7f)
[10:47:43.808] Cloning completed: 548.559ms
[10:47:48.077] Restored build cache
[10:47:48.151] Running "vercel build"
[10:47:48.767] Vercel CLI 33.2.0
[10:47:49.626] Injecting Gatsby.js plugin "@vercel/gatsby-plugin-vercel-builder"
[10:47:49.634] Installing dependencies...
[10:47:49.978] yarn install v1.22.17
[10:47:50.091] [1/4] Resolving packages...
[10:47:50.581] success Already up-to-date.
[10:47:50.584] Done in 0.61s.
[10:47:50.602] Running "yarn run build"
[10:47:50.808] yarn run v1.22.17
[10:47:50.854] $ gatsby build
[10:47:53.823] success compile gatsby files - 0.823s
[10:47:53.826] info The following flags are active:
[10:47:53.826] - PRESERVE_FILE_DOWNLOAD_CACHE · (Umbrella Issue (https://gatsby.dev/cache-clearing-feedback)) · Don't delete the downloaded files cache when changing gatsby-node.js & gatsby-config.js files.
[10:47:53.827] - PARALLEL_SOURCING · EXPERIMENTAL · (Umbrella Issue (https://gatsby.dev/parallel-sourcing-feedback)) · Run all source plugins at the same time instead of serially. For sites with multiple source plugins, this can speedup sourcing and transforming considerably.
[10:47:53.827]
[10:47:53.827] There is one other flag available that you might be interested in:
[10:47:53.827] - DETECT_NODE_MUTATIONS · Diagnostic mode to log any attempts to mutate node directly. Helpful when debugging missing data problems. See https://gatsby.dev/debugging-missing-data for more details.
[10:47:53.827]
[10:47:53.848] success load gatsby config - 0.024s
[10:47:54.482] success load plugins - 0.633s
[10:47:54.495] success onPreInit - 0.011s
[10:47:54.498] success delete worker cache from previous builds - 0.002s
[10:47:54.527] success initialize cache - 0.029s
[10:47:54.639] success copy gatsby files - 0.111s
[10:47:55.060] success Compiling Gatsby Functions - 0.413s
[10:47:55.063] success onPreBootstrap - 0.424s
[10:47:55.100] success createSchemaCustomization - 0.003s
[10:47:55.535] error "gatsby-plugin-mdx" threw an error while running the onCreateNode lifecycle:
[10:47:55.535]
[10:47:55.535] /vercel/path0/docs/extensions/effect.mdx: Expected corresponding JSX closing tag for

. (87:0)
[10:47:55.535]
[10:47:55.536] 85 | })
[10:47:55.536] 86 | }</code></pre> [10:47:55.536] > 87 | </li> [10:47:55.536] | ^ [10:47:55.536] 88 | <li parentName="ul"> [10:47:55.536] 89 | <p parentName="li"><strong parentName="p">{Supports Recursion:}</strong>{
[10:47:55.536] 90 | Recursion is supported with }<inlineCode parentName="p">{set.recurse}</inlineCode>{ for both sync and async use cases, but is not supported in the cleanup function.}</p> [10:47:55.568] [10:47:55.568] �[0m [10:47:55.568] �[0m �[0m�[97m�[41mSyntaxError�[0m�[37m�[41m:�[0m�[37m�[41m �[0m�[97m�[41m/vercel/path0/docs/extensions/effect.mdx: Expected corresponding �[0m �[0m�[97m�[41mJSX closing tag for <details>. (87:0)�[0m [10:47:55.568] �[0m �[0m�[97m�[41m 85 | })�[0m [10:47:55.568] �[0m �[0m�[97m�[41m 86 | }�[0m
[10:47:55.568] �[0m �[0m�[97m�[41m> 87 | �[0m
[10:47:55.569] �[0m �[0m�[97m�[41m | ^�[0m
[10:47:55.569] �[0m �[0m�[97m�[41m 88 |
  • �[0m
    [10:47:55.569] �[0m �[0m�[97m�[41m 89 |

    {Supports Recursion:}</stro�[0m �[0m�[97m�[41mng>{�[0m [10:47:55.569] �[0m �[0m�[97m�[41m 90 | Recursion is supported with }{set.recurse�[0m �[0m�[97m�[41m}{ for both sync and async use cases, but is not supported in th�[0m �[0m�[97m�[41me cleanup function.}

    �[0m
    [10:47:55.569] �[0m �[0m
    [10:47:55.569] �[0m �[0m�[90m-�[0m �[0m�[93mcredentials.ts�[0m�[90m:�[0m�[93m62�[0m�[37m �[0m�[37minstantiate�[0m
    [10:47:55.569] �[0m �[0m �[0m�[90m[website]/[@babel]/parser/src/parse-error/credentials.ts:62:21�[0m
    [10:47:55.569] �[0m �[0m
    [10:47:55.569] �[0m �[0m�[90m-�[0m �[0m�[93mparse-error.ts�[0m�[90m:�[0m�[93m60�[0m�[37m �[0m�[37mtoParseError�[0m
    [10:47:55.570] �[0m �[0m �[0m�[90m[website]/[@babel]/parser/src/parse-error.ts:60:12�[0m
    [10:47:55.570] �[0m �[0m
    [10:47:55.570] �[0m �[0m�[90m-�[0m �[0m�[93mindex.ts�[0m�[90m:�[0m�[93m1487�[0m�[37m �[0m�[37mJSXParserMixin.raise�[0m
    [10:47:55.570] �[0m �[0m �[0m�[90m[website]/[@babel]/parser/src/tokenizer/index.ts:1487:19�[0m
    [10:47:55.570] �[0m �[0m
    [10:47:55.570] �[0m �[0m�[90m-�[0m �[0m�[93mindex.ts�[0m�[90m:�[0m�[93m516�[0m�[37m �[0m�[37mJSXParserMixin.jsxParseElementAt�[0m
    [10:47:55.570] �[0m �[0m �[0m�[90m[website]/[@babel]/parser/src/plugins/jsx/index.ts:516:18�[0m
    [10:47:55.570] �[0m �[0m
    [10:47:55.570] �[0m �[0m�[90m-�[0m �[0m�[93mindex.ts�[0m�[90m:�[0m�[93m469�[0m�[37m �[0m�[37mJSXParserMixin.jsxParseElementAt�[0m
    [10:47:55.570] �[0m �[0m �[0m�[90m[website]/[@babel]/parser/src/plugins/jsx/index.ts:469:34�[0m
    [10:47:55.570] �[0m �[0m
    [10:47:55.571] �[0m �[0m�[90m-�[0m �[0m�[93mindex.ts�[0m�[90m:�[0m�[93m469�[0m�[37m �[0m�[37mJSXParserMixin.jsxParseElementAt�[0m
    [10:47:55.571] �[0m �[0m �[0m�[90m[website]/[@babel]/parser/src/plugins/jsx/index.ts:469:34�[0m
    [10:47:55.571] �[0m �[0m
    [10:47:55.571] �[0m �[0m�[90m-�[0m �[0m�[93mindex.ts�[0m�[90m:�[0m�[93m469�[0m�[37m �[0m�[37mJSXParserMixin.jsxParseElementAt�[0m
    [10:47:55.571] �[0m �[0m �[0m�[90m[website]/[@babel]/parser/src/plugins/jsx/index.ts:469:34�[0m
    [10:47:55.571] �[0m �[0m
    [10:47:55.571] �[0m �[0m�[90m-�[0m �[0m�[93mindex.ts�[0m�[90m:�[0m�[93m548�[0m�[37m �[0m�[37mJSXParserMixin.jsxParseElement�[0m
    [10:47:55.571] �[0m �[0m �[0m�[90m[website]/[@babel]/parser/src/plugins/jsx/index.ts:548:19�[0m
    [10:47:55.571] �[0m �[0m
    [10:47:55.571] �[0m �[0m�[90m-�[0m �[0m�[93mindex.ts�[0m�[90m:�[0m�[93m564�[0m�[37m �[0m�[37mJSXParserMixin.parseExprAtom�[0m
    [10:47:55.571] �[0m �[0m �[0m�[90m[website]/[@babel]/parser/src/plugins/jsx/index.ts:564:21�[0m
    [10:47:55.571] �[0m �[0m
    [10:47:55.572] �[0m �[0m�[90m-�[0m �[0m�[93mexpression.ts�[0m�[90m:�[0m�[93m718�[0m�[37m �[0m�[37mJSXParserMixin.parseExprSubscripts�[0m
    [10:47:55.572] �[0m �[0m �[0m�[90m[website]/[@babel]/parser/src/parser/expression.ts:718:23�[0m
    [10:47:55.572] �[0m �[0m
    [10:47:55.572] �[0m �[0m�[90m-�[0m �[0m�[93mexpression.ts�[0m�[90m:�[0m�[93m695�[0m�[37m �[0m�[37mJSXParserMixin.parseUpdate�[0m
    [10:47:55.572] �[0m �[0m �[0m�[90m[website]/[@babel]/parser/src/parser/expression.ts:695:21�[0m
    [10:47:55.572] �[0m �[0m
    [10:47:55.572] �[0m �[0m�[90m-�[0m �[0m�[93mexpression.ts�[0m�[90m:�[0m�[93m657�[0m�[37m �[0m�[37mJSXParserMixin.parseMaybeUnary�[0m
    [10:47:55.572] �[0m �[0m �[0m�[90m[website]/[@babel]/parser/src/parser/expression.ts:657:23�[0m
    [10:47:55.572] �[0m �[0m
    [10:47:55.572] �[0m �[0m�[90m-�[0m �[0m�[93mexpression.ts�[0m�[90m:�[0m�[93m395�[0m�[37m �[0m�[37mJSXParserMixin.parseMaybeUnaryOrPrivate�[0m
    [10:47:55.572] �[0m �[0m �[0m�[90m[website]/[@babel]/parser/src/parser/expression.ts:395:14�[0m
    [10:47:55.572] �[0m �[0m
    [10:47:55.572] �[0m �[0m�[90m-�[0m �[0m�[93mexpression.ts�[0m�[90m:�[0m�[93m407�[0m�[37m �[0m�[37mJSXParserMixin.parseExprOps�[0m
    [10:47:55.573] �[0m �[0m �[0m�[90m[website]/[@babel]/parser/src/parser/expression.ts:407:23�[0m
    [10:47:55.573] �[0m �[0m
    [10:47:55.573] �[0m �[0m�[90m-�[0m �[0m�[93mexpression.ts�[0m�[90m:�[0m�[93m362�[0m�[37m �[0m�[37mJSXParserMixin.parseMaybeConditional�[0m
    [10:47:55.573] �[0m �[0m �[0m�[90m[website]/[@babel]/parser/src/parser/expression.ts:362:23�[0m
    [10:47:55.573] �[0m �[0m
    [10:47:55.573] �[0m �[0m�[90m-�[0m �[0m�[93mexpression.ts�[0m�[90m:�[0m�[93m302�[0m�[37m �[0m�[37mJSXParserMixin.parseMaybeAssign�[0m
    [10:47:55.573] �[0m �[0m �[0m�[90m[website]/[@babel]/parser/src/parser/expression.ts:302:21�[0m
    [10:47:55.573] �[0m �[0m
    [10:47:55.573] �[0m
    [10:47:55.573] not finished source and transform nodes - 0.469s
    [10:47:56.574] error Command failed with exit code 1.
    [10:47:56.575] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    [10:47:56.594] Error: Command "yarn run build" exited with 1
    [10:47:57.717]

  • @dmaskasky
    Copy link
    Collaborator Author

    I fixed the Vercel deployment. I had missed a closing tag on the previous <details> block, which was causing this to fail.

    Copy link
    Member

    @dai-shi dai-shi left a comment

    Choose a reason for hiding this comment

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

    LGTM

    @dai-shi dai-shi merged commit 80c8d9f into pmndrs:main Jan 27, 2024
    33 checks passed
    @dmaskasky dmaskasky deleted the effect-recurse-docs branch January 29, 2024 18:51
    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.

    2 participants