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

No target defs #67

Closed
Xosmond opened this issue Oct 23, 2017 · 9 comments
Closed

No target defs #67

Xosmond opened this issue Oct 23, 2017 · 9 comments
Assignees
Labels

Comments

@Xosmond
Copy link

Xosmond commented Oct 23, 2017

Im getting this error:

Error in lib/jennifer/src/jennifer/adapter/base_sql_generator.cr:137: BUG: no target defs

          io << query._raw_select

When I run this command on a amber project:

crystal src/sam.cr -- generate:migration CreateCompanies

Any idea on whats the problem?

@z64
Copy link
Contributor

z64 commented Oct 23, 2017

Could you provide some of your environment details? Namely crystal version (crystal -v), version of jennifer (shards list), and what DB config you are using?

@imdrasil
Copy link
Owner

imdrasil commented Oct 23, 2017

@Xosmond @z64 yeah, I know the reason. somewhy sometimes (I can't find minimal code that will reproduce this bug) code like next:

class Test
  property var : Array(String)?
  def asd
    @var.not_nil!
  end
end

String.build do |s|
  t = Test.new
  t.var = ["asd"]
  s << v.asd
end

will provide such exception.

@imdrasil imdrasil self-assigned this Oct 23, 2017
@imdrasil
Copy link
Owner

@Xosmond Today will commit a fix to the master.

@Xosmond
Copy link
Author

Xosmond commented Oct 23, 2017

Heres the information (running on a MacOS 10.12.6):
Crystal version: Crystal 0.23.1 (2017-10-12) LLVM 4.0.1
Jennifer version 0.4.0 (while shards list show 0.3.4, shards.lock show 0.4.0)

Oh great @imdrasil, I will wait for it then. Thank you for taking care of it. I hope I can learn more crystal to contribute to Jennifer on the future.

@imdrasil
Copy link
Owner

@Xosmond try to pull from master branch actually it already should be fixed

@Xosmond
Copy link
Author

Xosmond commented Oct 23, 2017

@imdrasil Yes, you are right, with master branch it works fine. Now I can close this. Good job, Regards.

@Xosmond Xosmond closed this as completed Oct 23, 2017
@imdrasil
Copy link
Owner

@Xosmond in few hours I will make new release (0.4.1) so u can switch to normal specifying in shards file

@Xosmond
Copy link
Author

Xosmond commented Oct 23, 2017

@imdrasil Sr, I have some questions about validations (the way is implemented), where can we talk about it?

@imdrasil
Copy link
Owner

@Xosmond via email (u can find it in my profile). Or if u think that conversation is important or can help someone - create an issue

@imdrasil imdrasil removed the WIP label Oct 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants