Skip to content

[WIP] Editor mode #7369

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Draft
wants to merge 27 commits into
base: master
Choose a base branch
from
Draft

[WIP] Editor mode #7369

wants to merge 27 commits into from

Conversation

zth
Copy link
Collaborator

@zth zth commented Mar 28, 2025

No description provided.

@nojaf
Copy link
Collaborator

nojaf commented Apr 15, 2025

Hi @zth, I tried to play with this locally, but I can't get the library to build:

image

Is this working for you?

@zth
Copy link
Collaborator Author

zth commented Apr 15, 2025

Hi @zth, I tried to play with this locally, but I can't get the library to build:

image

Is this working for you?

Seeing the same locally. I had this previously, but can't remember what it was. Will try and have a look soon.

@zth zth force-pushed the analysis-simplification branch from 8204d40 to cdbed51 Compare April 26, 2025 18:06
@nojaf
Copy link
Collaborator

nojaf commented Apr 27, 2025

@zth the snapshot testing thing I mentioned is shown in this talk.

The thoughts I'm having about this is to have a snapshot per grand part of the test:

  • What untyped ast node was found
  • What typed tree info matches that.
  • What are the completions for it.

import { spawn, spawnSync } from "node:child_process";

// Get the current ReScript version
const rescriptVersion = spawnSync("./node_modules/.bin/bsc", ["-v"])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nitpick, but we probably have a better way to detect the bsc.exe.
Using cli/bin_path.js. @cometkim probably knows what to use.

Copy link
Member

Choose a reason for hiding this comment

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

import { bsc } from "#dev/process";

const { stdout: version } = await bsc(["-v"]);

should work.

@@ -0,0 +1,7 @@
exports[`RecordFieldCompletions.res - Record field completion in nested record 1`] = `
Copy link
Collaborator

Choose a reason for hiding this comment

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

I know you didn't focus on this, but this really is an unreadable snapshot file.

"dir": "support_files"
},
{
"dir": "test_files/.build"
Copy link
Collaborator

Choose a reason for hiding this comment

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

What exactly is the extra content from this .build folder?

@zth zth force-pushed the analysis-simplification branch from b1518ea to b11f460 Compare April 30, 2025 08:29
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants