aBothe / Mono-D

D Add-In for MonoDevelop
http://wiki.dlang.org/Mono-D
Other
113 stars 26 forks source link

version flags from dub.json not interpreted #593

Closed extrawurst closed 9 years ago

extrawurst commented 9 years ago

repro: simply clone https://github.com/Extrawurst/unecht/ open sample project: https://github.com/Extrawurst/unecht/blob/master/samples/helloworld/dub.json note how this project includes a specific version flag!

and browse to here: https://github.com/Extrawurst/unecht/blob/master/source/unecht/glfw/application.d#L62

in the dependencies. this will look like this: image

aBothe commented 9 years ago

Well, using version(UEIncludeEditor) inside app.d in the sample project works well. So it's only a question of inheriting version/debug conditions between projects or inside the dependency tree. -- What if I had two sample projects using unecht as dependency, but only one sample app emitted UEIncludeEditor inside its config, whereas the other sample project doesn't? \ And yes, I have these two sample projects loaded in my project pad, so other premises aren't working here :stuck_out_tongue:

aBothe commented 9 years ago

Okay, for pure editing experience, not fading out any version()-block might be a solution. But what about actual code resolution that is needed for completion that depends on version()-constraints?

aBothe commented 9 years ago

Preferring the 'startup'-project that is run when clicking the 'Play'-Button? What about dependency tree messing.. I hate this crap.

extrawurst commented 9 years ago

well it is not as if popular other D projects wouldn't use the same mechanism, see vibe.d's VibeDefaultMainversion flag:

https://github.com/rejectedsoftware/vibe.d/blob/master/examples/app_skeleton/dub.json#L12

aBothe commented 9 years ago

Soo.. quirk solution: Prefer the startup "Main" project, but ensure that the currently edited file is in a project that is a dependee of given Main project..or somewhere in between :/

extrawurst commented 9 years ago

um... i have no idea ? is this advice how to workaround on my end or your thinking out loud how to "quirk" implement this ?

extrawurst commented 9 years ago

cause in the given example case i cannot set anything else as a "main" project...?!

extrawurst commented 9 years ago

great thanks!