Skip to content

regression(1.04) invalid pragma: since with nim js #12996

@timotheecour

Description

@timotheecour

#12853 introduced a regression, breaking nim js for program that import std/strtabs

Example

# main.nim: import std/strtabs

Current Output

nim js main.nim

strtabs.nim(327, 39) Error: invalid pragma: since: (1, 1) 

Expected Output

works

Possible Solution

  • move since to system`; yes it adds 1 more thing to system, but since it affects exposing APIs, it belongs there, and also it really doesn't belong in inclrtl:
# Pragmas for RTL generation. Has to be an include, because user-defined # pragmas cannot be exported. 

and it can't be in a module that's imported because of current limitation (pragmas cannot be exported), so would require an include, which has known issues.

  • in the future we can lift limitation (pragmas cannot be exported) to improve this a bit

Additional Information

D20191230T174936

Metadata

Metadata

Assignees

No one assigned

    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