-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
Eclipse: The type ... cannot be resolved. It is indirectly referenced from required .class files #369
Comments
This is a bug in the module declaration of the GLFW binding. More precisely: GLFWVulkan uses parts of the Vulkan binding without this being specified in the The latter looks like this: /*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
*/
module org.lwjgl.glfw {
requires transitive org.lwjgl;
exports org.lwjgl.glfw;
} I'm however not sure how this could be solved without making the GLFW binding depend on the Vulkan binding or splitting |
Regarding the dependency, I'm brand new to LWJGL and these APIs in general so hopefully this isn't a silly idea. But from the docs for
Regarding the Eclipse error, does |
Somewhat unrelated, but I'm noticing that there's also a number of |
Hey @cwb123,
Your assumption is correct. OpenGL types are not exposed by GLFW and since LWJGL's bindings are basically bridges to native APIs, the binding does not require types of OpenGL (or the respective binding) either.
While this is possible (and already available in the "unsafe" version of GLFWVulkan::glfwGetInstanceProcAddress) I would argue that this would defy LWJGL's purpose of being as type-safe as possible without hurting performance. However, unless we want to split
I'm not sure about how Eclipse handles dependencies internally but a module declaration should generally be ignored on the classpath. There is nothing else that could prevent the GLFW binding to access code from the Vulkan binding though.
This is something I didn't dig into too much yet. I'll refer this one to @Spasi. Additional notes: |
I'm working on fixing this asap. It's trivially resolved by adding: requires static org.lwjgl.vulkan; to the GLFW module.
|
@TheMrMilchmann I'll go ahead and put in an Eclipse bug report then. @Spasi Regarding L156 L193 |
The next snapshot (3.1.6 build 13) will have the missing Thanks @cwb123! |
The type org.springframework.data.repository.query.QueryByExampleExecutor cannot be resolved. It is indirectly referenced from required .class files. |
Environment
3.1.5
1
9.0.1
9.0.1+11
Windows 7 x64
glfw
&vulkan
Oxygen.2 Release (4.7.2)
20171218-0600
Description
I'm not sure if this is a bug in Eclipse or with some of the machine-generated code in LWJGL3. On their own, either of
org.lwjgl.glfw.GLFWVulkan
andorg.lwjgl.vulkan.VkInstance
can be imported and used without issue. However, when I import both of these types into the same source file, Eclipse issues the errorThe type org.lwjgl.vulkan.VkInstance cannot be resolved. It is indirectly referenced from required .class files
. Sometime I can also trigger the (additional) errorThe import org.lwjgl.vulkan.VkInstance cannot be resolved
, but it's not clear to me what precise source code conditions are required for the second one. Strangely, the source file still compiles and runs just fine - only the Eclipse autocomplete functionality is broken by these errors. Also, even when the errors are present Eclipse is happy to link me into the respective source files using the 'Open Declaration' command.I have already tried:
Of note, my copy of LWJGL3 was extracted from the zip archive and the modules
core
,glfw
, andvulkan
were manually configured as an Eclipse 'User Library' for the workspace. Both sources & javadocs are correctly attached, the jars for natives are included, the User Library is added to the project's build path as a library on the classpath, and everything builds and runs without issue (excluding this mysterious error).I would be grateful if anyone here could attempt to reproduce this for me.
The text was updated successfully, but these errors were encountered: