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

WIP: Stdlib namespace for Core modules #7285

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

Conversation

cknitt
Copy link
Member

@cknitt cknitt commented Feb 8, 2025

This is to avoid name clashes with user modules as observed in #7126 (comment).

@cknitt cknitt force-pushed the stdlib-namespace branch 3 times, most recently from af47499 to 5c0a664 Compare February 8, 2025 08:21
"insertText": "Some(${1:_})",
"insertTextFormat": 2
}, {
"label": "Some(date)",
"label": "Some(stdlib_Date)",
Copy link
Member Author

Choose a reason for hiding this comment

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

@zth Weird that this starts with a lower case letter here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Well, it's an identifier so it's not weird per se. But, we should probably filter out the stdlib part.

@@ -35,76 +35,76 @@ Package opens Pervasives.JsxModules.place holder
ContextPath Type[withDate]
Path withDate
[{
"label": "Js.Date.makeWithYMD()",
"label": "Stdlib_Date.makeWithYMD()",
Copy link
Member Author

Choose a reason for hiding this comment

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

@zth Here we need to do something to get Date instead of Stdlib_Date.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yup! We need to filter out Stdlib_ whenever it appears. I think we can make this a separate issue that we can worry about in a separate PR after this one is merged. Do you agree?

Copy link
Member Author

Choose a reason for hiding this comment

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

@zth I don't know, there are other issues with analysis now, many completions have disappeared. Would be good to get this fixed as part of this PR I think.
Maybe you can help me there, I'll let you know when I have finished everything from my side.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sure! Just ping me.

@@ -21,6 +21,8 @@ export const someFunWithNullUndefinedArg: unknown = someFunWithNullUndefinedArgT

const CoreJS = require('./Core.res.js');

import type {Date_t as Stdlib_Date_t} from './Stdlib.gen';
Copy link
Member Author

Choose a reason for hiding this comment

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

@cristianoc How can I avoid this?

@cknitt cknitt force-pushed the stdlib-namespace branch 4 times, most recently from 42038a5 to 93beba5 Compare February 9, 2025 08:18
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Syntax Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.05.

Benchmark suite Current: dcd26b9 Previous: e1b7fb7 Ratio
Parse RedBlackTree.res - time/run 1.3641321999999998 ms 1.2123143266666667 ms 1.13
Parse Napkinscript.res - time/run 42.868526106666664 ms 39.28006235333333 ms 1.09
Parse HeroGraphic.res - time/run 5.7648673 ms 5.13472718 ms 1.12

This comment was automatically generated by workflow using github-action-benchmark.

@cknitt cknitt force-pushed the stdlib-namespace branch 2 times, most recently from dab5123 to 8ed70db Compare February 9, 2025 09:32
@cknitt cknitt force-pushed the stdlib-namespace branch 2 times, most recently from 5a4c52c to 33dd8c6 Compare February 9, 2025 13:30
@cknitt cknitt force-pushed the stdlib-namespace branch 5 times, most recently from 45ef852 to 183e888 Compare February 11, 2025 16:17
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