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

Error in 2.2.1 #29

Closed
jacobaraujo7 opened this issue Sep 21, 2022 · 4 comments · Fixed by #30
Closed

Error in 2.2.1 #29

jacobaraujo7 opened this issue Sep 21, 2022 · 4 comments · Fixed by #30
Labels
bug Something isn't working

Comments

@jacobaraujo7
Copy link
Contributor

After dart run orm generate

PS D:\Projects\FTeamERP\backend> dart run orm generate
Generate client...                      Could not format because the source could not be parsed:

line 6826, column 43 of .: Unterminated string literal.
     ╷
6826 │ const  String  schema = 'generator client {
     │                                           ^
     ╵
line 6903, column 5 of .: Unterminated string literal.
     ╷
6903 │ \n}';
     │     ^
     ╵
line 6826, column 25 of .: Expected to find ';'.
     ╷
6826 │ const  String  schema = 'generator client {
     │                         ^^^^^^^^^^^^^^^^^^^
     ╵
line 6827, column 1 of .: Expected a method, getter, setter or operator declaration.
     ╷
6827 │ \n  provider = "prisma-client-dart"
     │ ^
     ╵
line 6827, column 16 of .: Expected to find ';'.
     ╷
6827 │ \n  provider = "prisma-client-dart"
     │                ^^^^^^^^^^^^^^^^^^^^
     ╵
line 6828, column 1 of .: Expected a method, getter, setter or operator declaration.
     ╷
6828 │ \n  previewFeatures = ["interactiveTransactions"]
     │ ^
     ╵
line 6828, column 49 of .: Expected to find ';'.
     ╷
6829 │ \n}
     │  ^
     ╵
(276 more errors...)
#0      DartFormatter.formatSource (package:dart_style/src/dart_formatter.dart:144:7)
#1      DartFormatter.format (package:dart_style/src/dart_formatter.dart:72:12)
#2      generator (file:///C:/Users/jacob/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/orm-2.2.1/bin/src/generator/generator.dart:102:38)
#3      GenerateCommand.runGenerator (file:///C:/Users/jacob/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/orm-2.2.1/bin/src/commands/generate_command.dart:150:11)
<asynchronous suspension>
#4      GenerateCommand.run (file:///C:/Users/jacob/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/orm-2.2.1/bin/src/commands/generate_command.dart:111:30)
<asynchronous suspension>
#5      CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#6      main (file:///C:/Users/jacob/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/orm-2.2.1/bin/orm.dart:50:5)
<asynchronous suspension>

@medz
Copy link
Owner

medz commented Sep 21, 2022

@jacobaraujo7 Can you give a minimal schema code? I need to reproduce. Because I can't reproduce it from the example.

@medz
Copy link
Owner

medz commented Sep 21, 2022

Maybe further wrapping is needed for the value at https://github.com/odroe/prisma-dart/blob/main/bin/src/generator/client_builder.dart#L27 just creates a variable of type String.

@jacobaraujo7
Copy link
Contributor Author

jacobaraujo7 commented Sep 21, 2022

@jacobaraujo7 Can you give a minimal schema code? I need to reproduce. Because I can't reproduce it from the example.

I'm testing with the package example. I'm using Windows.

@medz
Copy link
Owner

medz commented Sep 22, 2022

@jacobaraujo7 Can you give a minimal schema code? I need to reproduce. Because I can't reproduce it from the example.

I'm testing with the package example. I'm using Windows.

I think I know how to fix this bug. Later, I will checkout new branch fix it and add Windows system tests to CI.

@medz medz added the bug Something isn't working label Sep 22, 2022
@medz medz linked a pull request Sep 22, 2022 that will close this issue
@medz medz closed this as completed in #30 Sep 22, 2022
medz added a commit that referenced this issue Sep 22, 2022
fix(generator): Fixed generate `schema` not working - #29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants