Skip to content

Blocked rescript@11 migration #467

@DZakh

Description

@DZakh

I've tried migrating the project at Carla to rescript@11 several times. I've fixed all the issues besides the problem with rescript-relay:

For context, we want to use uncurried: false since the codebase is quite big, and we want to gradually migrate to uncurried mode. Because of this, the rescript-relay V3 is not an option for us.

So we need to use rescript-relay V2 until we completely migrate to uncurried mode. But there's another problem. It uses _ prefixes for gql fields having restricted names. In rescript@10 the _s were removed in runtime, but after my PR 😅 I removed the fields mangling logic from rescript@11. This way, rescript-relay V2 stopped handling private keywords in rescript@11 properly, the fields in compiled js are now prefixed with _.

Later, I've added the PR to allow using @as with @obj so there's a migration path from fields mangling logic.

So, now I'd like to update rescript-relay V2 to use @as instead of _ for private keywords in the generated code. I've already taken a look in the source code and noticed a submodule written in Rust. If you tell me how to contribute to it, I'd like to give it a try. I really wish to start using rescript@11 in production.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions