Replies: 3 comments 6 replies
-
This works for me: It's processing this bundle: You could use this automated setup to create a development environment with a working example: Maybe you show what you've done so someone might spot the problem. Something as simple as forgetting to mentioned the library in the bin.includes of the build.properties will be a problem, at least in the final deployed build: |
Beta Was this translation helpful? Give feedback.
-
It would be good to get a testcase that exhibits this issue. Could it be that you have multiple fragments? Or that you have |
Beta Was this translation helpful? Give feedback.
-
This indeed a real issue and I have a possible fix going in #238 Thanks @krooq for opening the issue. Your original debugging analysis in #236 was correct. I wish that issue had not been converted to a discussion so swiftly. @laeubi I'm not sure why that original issue is now locked from when you converted it to a discussion. Can you unlock and reopen that original issue #236? |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm trying to load a library from a fragment using the Bundle-NativeCode header.
The library fails to load, when I debug all the way through I find that the
NativeCodeFinder
seems to only return library paths from the host bundle in itsfindBundleNativeCode
method.My guess is that the
nativeCode.get(0)
sections in the method are just a typo or something that should instead refer to the moduleWire loop variable but that's just a guess.This is all I can discern and tbh I don't really know if I'm even doing it right.
It seems odd that this feature would be broken since a main use case for fragments is this loading of different native libs..
There doesn't seem to be any documentation on how to configure the Bundle-NativeCode hearder differently for a fragment compared to a regular plugin so I just assume its the same but there are only 2 SO articles kind of related to this problem and they don't seem to provide concrete solutions.
EDIT: Extra info
In my case I have a host bundle that has a linux and windows binaries
i.e.
And multiple fragments but only one with native libs, and only for windows
i.e.
As there are multiple libs it never hits the first case and always falls through to the second indexResult.
Since the getNativePaths method only ever returns the attributes of the requirement from the first ModuleWire (the host bundle) I don't see how it could ever return something from a fragment. However as @merks has shown, clearly it can so I must be misunderstanding part of the code.
EDIT 2: It is also not working in the dev environment so the build properties isn't the issue I don't think.
Beta Was this translation helpful? Give feedback.
All reactions