Eclipse projects get compile errors, cant find org.eclipse.* or org.osgi.* - eclipse

Sometimes I get compilation problems with my Eclipse projects, they suddenly cant find any org.eclipse.* packages and therefore nothing compiles. It doesnt happen that often, so I havent been able to properly determine the cause, but this last time it I installed and then uninstalled some big features.
There is a workaround for it though, delete the projects from workspace and then reimport them.
Anyone else recognize this and know an easier solution?

It should be like my recent problem, when eclipse do not see java.lang.Object. I usually just put a space into the projectroot/.classpath somewhere outside xml tags, and it solves the problem. If not try .project file as well. This is only a workaround, but usually works.

Related

I tried to edit Rust code in Eclipse IDE, but I got problem "Failed to create the part's controls"

I downloaded an Eclipse's extinction for Rust, but then, after creating a new Rust project, i got this problem
I tried to follow some instuctions that I was able to found, including some from this website. I deleted and then downloaded Rust on my computer, I deleted and downloaded Eclipse, same with VS C++ building tools, but all this didn't help. I saw, that for some people helps to just reenter current workspace, but it was not my case. Despite this problem, default code seems to run OK, but it is almost impossible to edit. If someone had this problem or just know how to solve it, can you help please?
P.S. My English probably is not very good, so sorry for mistakes.
This is a known issue. Update to the latest proper TM4E release from https://download.eclipse.org/tm4e/releases/latest/ so that you have the bundle version with this class present.

Advice to fix 'No such module' issues for pods in Xcode project

I'm facing this No such module 'SomeModule' error in an XCode solution that I've inherited from some other developers. Initially the error is No such module 'ObjectMapper', but I find that if I swap the position of that line with the one below, it becomes No such module 'Alamofire'.
I've tried all the simple things suggested on this site (and others), making sure I'm opening the .xcworkspace file, deleting everything and re-installing (derived data, the whole Pods directory, etc.), updating cocoapods, etc.
I suspect that what's actually going on is that either the pods themselves aren't building, but for some reason the errors there are making their way to XCode's obtuse errors list, or that they are building but somehow not being linked correctly.
This is actually a project I've inherited from some other developers, so it's hard to know what weird or wonderful configuration they've done to break things. They are using an approach that I've not seen before where there's 3 build schemes for different environments (in this case Develop, Stage and Prod) then this kind of parent scheme for all the other three.
I've also tried going to 'Manage Schemes' then ticking the 'Show' checkbox for the Pods-Sunflower project. When I try to build just that project, I get a bunch of errors (mainly for Facebook, Google and Realm pods) that say things like:
Unable to load contents of file list: '/Target Support Files/FBSDKCoreKit/FBSDKCoreKit-xcframeworks-input-files.xcfilelist'
I don't expect anyone will be able to provide me a set of steps on how to solve this issue (I mean, that would be great), but I am hoping that someone can help me find ways to just work out what the problem is here, like:
How can I verify that all the separate pods are actually building?
Is there some folder where I can see all the built pods?
When you get a No such module 'SomeModule' error, where is Xcode trying to find the modules (like, in the file system? where?)
Thanks. I know this is one of those perennial issues, appreciate any advice.
The solution which worked for me was:
First thing i do when i got project from another developer is make a copy of pods and completely delete following files
Podfile
Pods folder
Podfile.lock
xcworkspace
In case you already once use that same project try deleting derived data
After deleting pods, reinstall pods and open project and let xcode do indexing of your project and after indexing look left side where warnings and errors shows, In there sometime you just have to just click and update or convert whatever xcode suggesting.
Note: - Sometimes doing same thing doesn't work try changing sequence because its xcode sometimes become dumb. Also try restarting
Honestly in these situation all i do is hit and try.
But above steps generallt works for me.

Eclipse: Complete Build State Clean/Reset

Is there a good way to reset Eclipse build state completely?
I am stuck getting 'Building all...' on each build (manual, BTW), even though it seems to finish normally, and it has been working just fine for weeks, and I've had this issue before, but it would resolve itself on one or more rebuilds; all of which leads me to believe that there is something internal that gets stuck in a wrong state.
Clean Project does not seem to do it. And the full rebuild 'says' it does a clean anyway, 'cleaning output folder'.
Clean + Close Project + Restart Eclipse does not seem to do it either (which fact I find rather unsatisfying and weird).
I suppose a re-import could do it.
Perhaps re-import under a different name?
But maybe there's something easier than re-import. Perhaps deleting some file or folder in Eclipse persisted state?
(Maybe tag this 'internals'? I am asking for specific solutions, but I am certainly interested in the IDE internals too, whether that will help solve this issue or not.)

Xcode is marking all symbols as 'undeclared type' yet they are visible and the project compiles fine

Just to get some context here is a screenshot, though you probably gathered this from the title:
Xcode is marking all symbols as undeclared, usually this would be because it doesn't exist or isn't imported, but in this case it was working fine 20 minutes ago and weirdly the project compiles and runs with no problems.
When I compile the errors go away but there is no syntax highlighting, as soon as I start to edit the file the errors all come back. I can work if I remember the exact signatures for anything that I need to use but with the lack of code completion and errors this is very hard.
Notably this is only a problem in a few source files, its not even the whole project. Nothing has changed that I am aware of that could cause this.
Before anyone suggests it, I have tried cleaning, deleting derived data/build folder, restarting Xcode etc...
My colleague is seeing the exact same issue on his machine.
So I managed to fix the offending source files, I just compared their attributes to those of a working source file and it turns out that the problem files included the tests project in their target membership and the working file did not. I'm not sure why this is causing the issue as other projects use automated testing without a problem. Nonetheless this solved it for me, at least until I start writing test cases...

org.codehaus.plexus.archiver.jar.Manifest.merge(org.codehaus.plexus.archiver.jar.Manifest)

This godforsaken error in eclipse won't die. I've tried everything mentioned here and elsewhere to get rid of it, but it won't go away and now I can't use the web service utility in eclipse because it complains about this "problem", which apparently isn't really a problem, but it is with m2e, which for the most part is useful.
First off, the error message, if you can call it that, is not very helpful. Whichever component generates that, could you produce something more meaningful?
Anyway, I've tried deleting the problems in eclipse, but they only come back. I've re-worked poms and updated the versions of the maven-ear-plugin to 2.3.2, all to no avail (and seriously, wouldn't that just be trying to skirt the real issue?). I've tried creating and updating a lifecylcle-mapping-metadata.xml file to ignore the org.codehaus.plexus -> plexus-archiver -> manifest goal. Nothing works.
What exactly is causing this message and what is the RIGHT way to diagnose the underlying cause and then solve it? Any insight would be most greatly appreciated.
This is caused by m2eclipse-mavenarchiver invoking the mavenarchiver plugin merge method by reflection. The method was removed in mavenarchiver 2.4, breaking m2eclipse-mavenarchiver.
This issue was fixed in m2eclipse-mavenarchiver 0.17.0 you can install from https://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-mavenarchiver/0.17.0/N/LATEST/
(URL updated to HTTPS)