Skip to content

Cannot bundle functions with Chinese character names #3804

Description

@sgalal

(Previously reported in purescript/spago#590)

Steps to reproduce:

$ mkdir TestProject
$ cd TestProject
$ spago init

Modify /src/Main.purs:

module Main where

import Prelude

import Effect (Effect)
import Effect.Console (log)

_試 :: Effect Unit
_試 = do
  log "🍝"

main :: Effect Unit
main = _試

Then:

$ spago run
[info] Installation complete.
Compiling Main
[info] Build succeeded.
🍝
$ spago bundle-app --main Main --to index.js
[info] Installation complete.
[info] Build succeeded.
Error in module Main (Regular):

  The module could not be parsed:
  lexical error @ line 4 and column 6
[error] Bundle failed.

The command invoked by spago is:

$ purs bundle "output/*/*.js" -m Main --main Main -o index.js
Error in module Main (Regular):

  The module could not be parsed:
  lexical error @ line 4 and column 6

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions