Skip to content

Casing in namespace is not respected #144

Closed
@nojaf

Description

@nojaf

In https://github.com/rescript-lang/experimental-rescript-webapi I noticed that bunx rewatch has slightly different output than bunx rescript.

Steps to reproduce:

  • Create new project with rescript@12.0.0-alpha.4
  • Add "namespace": "PkmnAPI", to rescript.json
  • Create a function in one file and use it in another

ProduceAPI.res

let meh = (a: int) => {
  true
}

Consume.res

let b  = ProduceAPI.meh(1);

After bunx rescript I get:

// Generated by ReScript, PLEASE EDIT WITH CARE

import * as ProduceAPI$PkmnAPI from "./ProduceAPI.re.js";

let b = ProduceAPI$PkmnAPI.meh(1);

export {
  b,
}
/* b Not a pure module */

with bunx rewatch:

// Generated by ReScript, PLEASE EDIT WITH CARE

import * as ProduceAPI$PkmnApi from "./ProduceAPI.re.js";

let b = ProduceAPI$PkmnApi.meh(1);

export {
  b,
}
/* b Not a pure module */

ProduceAPI$PkmnAPI (rescript) versus ProduceAPI$PkmnApi (rewatch)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions