Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upinfer_schema! generates error: no rules expected the token `)` #754
Comments
This comment has been minimized.
|
Can you run |
This comment has been minimized.
pwestrich
commented
Feb 24, 2017
|
I get the exact same error message:
|
This comment has been minimized.
|
What about without |
This comment has been minimized.
pwestrich
commented
Feb 24, 2017
|
Without that flag, cargo gets angry at me, because I have both a library and an executable in the same crate. When I replace Now if I run it with the |
This comment has been minimized.
|
Hm. Well I'm not sure why the error message you're seeing complains about |
This comment has been minimized.
pwestrich
commented
Feb 24, 2017
|
How in the world did I get an unsigned float? That's certainly not a thing that exists. I'll go check my schema and make sure I don't have any imaginary types floating around. |
This comment has been minimized.
Maybe that? |
This comment has been minimized.
|
If nothing else we should be giving a specific and helpful error message here. |
This comment has been minimized.
pwestrich
commented
Feb 24, 2017
|
That would certainly be nice. Removing the unsigned attributes, I'm now getting a new set of error messages. I'm guessing form them that you don't support the char type either? Is there a list I can reference somewhere? |
This comment has been minimized.
|
http://docs.diesel.rs/diesel/types/index.html is the list of the supported types across all backends. You can also see the types Mysql specifically supports so far by looking at the list of |
This comment has been minimized.
|
If you could actually give a list of the types that you need which aren't supported, that would be extremely useful information for feature prioritization |
added a commit
that referenced
this issue
Feb 24, 2017
sgrif
referenced this issue
Feb 24, 2017
Closed
Give a more specific error message for unsigned types #757
This comment has been minimized.
pwestrich
commented
Feb 24, 2017
|
I'm not using any other crazy types, so I don't think I'll need any added, though I'm sure it would be nice in the future to support all the types the respective databases do at some point. I'll just make my chars into varchars for the time being. |
This comment has been minimized.
That's roughly the plan (though types that have more involved capabilities such as geometry types will likely live in third party crates) |
pwestrich commentedFeb 23, 2017
I'm working on integrating Diesel into one of my projects at work instead of using the MySQL drivers directly. As soon as I add the line
infer_schema!("dotenv:DATABASE_URL");anywhere in my project, I get the error mentioned in the title:error: no rules expected the token ')'. I can't for the life of me figure out what it means or what causes it.My .env file exists and is fine, as the diesel command line tool has no objections with it. I'm importing diesel and diesel_codegen in the correct order in my lib.rs, as I've seen that sometimes causes problems. I have also tried varying import statements, though none are required in any of the examples.
I have tried building the examples, and they work fine. That leads me to believe it's a problem in my project, however, I have no idea where to start looking, as this error is pretty cryptic.
Rust version: rustc 1.15.1 (021bd294c 2017-02-08)
Diesel version: 0.11.4
Diesel features: mysql