Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[epic] [v13] List of current issues, missing features and possible improvements in the new compiler (and relay) #3749

Open
15 of 20 tasks
alunyov opened this issue Jan 14, 2022 · 8 comments
Assignees
Labels
pinned Pinned issues will never be marked stale by stalebot rust Related to the compiler written in Rust

Comments

@alunyov
Copy link
Contributor

alunyov commented Jan 14, 2022

Here we will keep track of the progress of the release/adoption of the new compiler in OSS.

If there is something that is blocking you from adopting the new compiler (and it is not mentioned in this list) please create a new issue, we will review and add it to the list/or trying help with the fix.

The goal: help prioritizing critical bug-fixes/features for upcoming v13.0.2 release (and beyond).

Current Reported Issues:

Bugs:

Missing Features:

Possible Improvements:

@alunyov alunyov self-assigned this Jan 14, 2022
@alunyov alunyov added rust Related to the compiler written in Rust pinned Pinned issues will never be marked stale by stalebot labels Jan 14, 2022
@alunyov alunyov pinned this issue Jan 14, 2022
@seanaguinaga
Copy link

seanaguinaga commented Feb 10, 2022

Documentation has a few TODOs - not sure if that's related or I should make a separate issue

@bigfootjon
Copy link
Member

bigfootjon commented Feb 10, 2022

Would OSS support for EntryPoint (which AFAICT just means generating $Parameters.js files, and writing docs) be a good thing to mention under "Possible Improvements:"?

@mikeldking
Copy link
Contributor

mikeldking commented Feb 12, 2022

Just migrated a large code base to 13.1.1
Main pain-points I had:

  • Wasn't clear that the relay-compiler doesn't support --config flag anymore
  • We used relay-config which is no longer supported. Also the config file needs to be JSON instead of JS.
  • New relay hook type signature changes and changes in type exports from relay-compiler. They are cleaner but it took quite a bit of refactoring.
  • relay-compiler defaulted to typescript without a config - this doesn't match the docs?

Thanks for all the improvements! Excited to be on 13.

@alunyov
Copy link
Contributor Author

alunyov commented Feb 16, 2022

Thanks @mikeldking !

I think 1,2 items are probably connected. We do support --config flag, but it is probably cannot read JS files.

let config_result = if let Some(config_path) = opt.config {
Config::load(config_path)

Typescript should not be a default language, maybe you have other config that have typescript in it?

fn default() -> Self {
Self::Flow
}

@mikeldking
Copy link
Contributor

mikeldking commented Feb 17, 2022

Hey thanks for the response @alunyov

I forked the examples to show what I'm seeing: relayjs/relay-examples#208

Issue 1 (--config not supported)

If you run yarn build:with-config-option (e.g. relay-compiler --config ./relay.config.json) you will get

➜  todo git:(relay-compiler-bug-demo) ✗ (⎈ |mynamespace:mikeldking) yarn build:with-config-option
yarn run v1.22.17
warning ../../../package.json: No license field
$ relay-compiler --config ./relay.config.json
error: Found argument '--config' which wasn't expected, or isn't valid in this context

	If you tried to supply `--config` as a value rather than a flag, use `-- --config`

USAGE:
    relay [OPTIONS] [CONFIG]

For more information try --help
error Command failed with exit code 2.

This diverged (seems to be fixed?) from the docs so it caused some confusion.

Previously you could mix CLI option flags with a config file but now you cannot. E.g. the only valid syntax in this case is relay-compiler ./relay.config.json. We were using a relay.config.js as a base config for two relay compilation steps (two different entry points into our app). We now have a relay.xxx.config.json and a relay.yyy.config.json to accomplish the two compilations.

Issue 2 (typescript default when using options)

You are right, in the case where there is no language specified in the config file, it defaults to flow. However in the case you run the compiler with flags (yarn build:with-options or relay-compiler --schema ./data/schema.graphql --src ./js --artifactDirectory ./__generated__/relay), you will get typescript emitted.

See video:

Screen.Recording.2022-02-17.at.10.29.07.AM.mov

Hope that helps clarify things!

@alunyov
Copy link
Contributor Author

alunyov commented Feb 17, 2022

Thanks @mikeldking for detailed report!

@simkessy
Copy link

simkessy commented Apr 5, 2022

the old compiler used to output the changed files, is this something that was removed?

@alunyov
Copy link
Contributor Author

alunyov commented Apr 6, 2022

the old compiler used to output the changed files, is this something that was removed?

Hmm, can you create an issue for this? With the possible example/repro to better understand what output should have changed files?

@captbaritone captbaritone unpinned this issue Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pinned Pinned issues will never be marked stale by stalebot rust Related to the compiler written in Rust
Projects
None yet
Development

No branches or pull requests

5 participants