Skip to content

Pervasives is open in autocomplete with -nopervasives flag #262

@bloodyowl

Description

@bloodyowl
Contributor

I'm experimenting only opening a subset of Pervasives so that none of OCaml's style leak to the user.

https://github.com/bloodyowl/rescript-js/blob/main/src/ReScriptJs__Pervasives.res

Using the following bsc-flags, it seems like Pervasives isn't conditioned to the absence of -nopervasives flag.

[
  "-open Belt",
  "-open ReScriptJs__JsWithPervasives",
  "-nopervasives"
]

Activity

cristianoc

cristianoc commented on May 31, 2021

@cristianoc
Collaborator

++ @bobzhang : is -nopervasives part of the officially supported API?

bobzhang

bobzhang commented on Jun 1, 2021

@bobzhang
Member

only opening a subset of Pervasives so that none of OCaml's style leak to the user.

That's something we want to achieve in the upstream too, do you have a list of functions to hide?
nopervasives works but should be an internal flag.
@bloodyowl I would suggest we work together in this direction, there is a similar discussion here

cristianoc

cristianoc commented on Jun 1, 2021

@cristianoc
Collaborator

Once something official is worked out, we can support it in the editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @bobzhang@bloodyowl@cristianoc

        Issue actions

          Pervasives is open in autocomplete with -nopervasives flag · Issue #262 · rescript-lang/rescript-vscode