wpilibsuite / eclipseplugins Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
The install performed by the plugins seems to race with updateVariables method in JavaPlugin.java such that the Properties file is not always created when we try to reference it.
In C++ and Java examples
The Eclipse C++ plugins attempt to build all projects in the workspace before deploying the desired project. The plugins should only be building the project for which the deploy was requested.
The compiler settings should be updated, not completely replaced, to allow users to customize them without having them wiped on the next plugin update.
It's highly annoying to try and find the examples. Make it a repo, and then during the plugin build process it pulls down the examples.
Reference: https://www.chiefdelphi.com/forums/showthread.php?t=155024, but I'm sure that's not the only person who has been confused.
Currently, FRC projects are updated when eclipse is started. This works in the case of updating the plugins, because eclipse will be restarted. However, in the case of installing eclipse new, and then importing a project from source control (or robot builder) it can lead to a project that doesn't build until eclipse is closed and then opened again.
When selecting the debug deploy option in eclipse, the build appears to happen but the debugger fails to connect to the remote target.
https://www.chiefdelphi.com/forums/showthread.php?t=153511 lists out another user with the same symptoms. Although the debug-deploy ant target appears to build fine, the launching of the debugger drops into this loop and continues through all available attempts before giving up. RIO can be found over MDNS (that's what the deploy uses).
I am curious if the ant build call here is guaranteed to let the ant build finish before it returns. I haven't yet set up the environment to build/debug the plugin to find out.
We replicated this issue on two different PC's, and suspect it is present on a third...
For now, we are working around it by either using printf's, or manually starting the JVM on the RIO with the right debugger flags and manually setting eclipse to connect to the remote machine.
Tests were done with a fresh, new, unmodified IterativeRobot project
Only the C++ compiler settings are configured by the plugins. The C compiler settings are not set at all (e.g. include paths, etc).
We currently copy UserLib SO files on every deploy. To speed up deploy and reduce flash wear, we should only be copying these when necessary. Need to implement a strategy (such as checksums) to determine when it's necessary.
If a user adds a java library to the user libraries directory and then deletes it (after the project autoupdater runs), the deleted library isn't deleted from the .classpath. This causes all java projects to be marked with an issue in eclipse because of the missing items in the classpath.
This does not affect building, but is annoying.
Specifying the user library location in multiple places is messy and inflexible. Switch to using Path API with path stored in global properties for cleaner code.
There should be a location (probably user\java\sourced and javadoc) where vendors can install source and javadoc jars, and variables set up to connect them to the library jar. Could probably assume the same extensions as vendor-template uses (-sources and -javadoc).
Update Eclipse Plugin examples that use Camera Server and NI Vision after new Camera Server and OpenCV are added and NI Vision is removed.
NI Vision dependent examples (old game examples) should probably move to NIVision repo and installer rather than being ported.
For Beta, we are allowing multiple images that use the same version of the FPGA. For the season this is not the desired behavior, so for in season release we MUST remove the multiple allowed versions. Issue here just for a reminder.
The Sample, Iterative, and Command Templates all fail to compile.
If the plugins throw an error when trying to unzip resources to the /wpilib directory, you get an error about the dialog needing to be in the UI thread instead of the correct informative dialog.
With the introduction of JDK 9, it's possible teams will start trying to build robot code with it. The roboRIO only has JDK 8. It appears this can be done with .settings/org.eclipse.jdt.core.prefs
in the project folder with the following settings:
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
the last line is erroneous, and should be removed. then it is correct
Some of the recent commits have added mixed tabs/spaces. We need to clean those up to spaces and follow the style guide.
Having:
catch (Exception e) {
// Nothing here
}
Will squash the interrupted flag meaning that the plugin can hang the plugin forever.
Similarly:
catch (InterruptedException e) {
// We only do logging here.
LOGGER.log("Blah", e);
}
has the same problem.
There are various places where this code exists and should be cleaned up.
http://www.yegor256.com/2015/10/20/interrupted-exception.html
Add the locations of the built plugins to the README
Consider using the file that's stored in the roborio that has the current image version number rather than the web interface.
Currently, wpilibc projects do not build with the pthread
flag. With changes made in actually building wpilibc, this is occasionally required. We need to add the flag to new projects created, and make sure the flag is added to any old projects.
If I delete all the projects from the workspace, then restart, then create a new command based c++ project, the indexer runs after the project opens. If I then create a second command-based robot project in the same workspace, the indexer doesn’t run.
If I manually add a library to my project configuration, then restart eclipse, my library is no longer in the configuration. My list of libraries returns to wpi and whatever is in the wpilib/user/cpp/lib folder -- nothing else. During the season, my team builds three unique robots and several bits of test hardware. Common code is placed in team developed libraries and is updated regularly. The robot projects then include those libraries in their configuration. If I manually edit the project configuration, my changes should not be undone by the wpilibsuite plugin.
There is a work-around in that I can create empty files in the wpilib/user/cpp/lib folder that represent the team libraries, then manage the library paths to make sure the actual libraries are found before the empty placeholder. This does not seem like a good solution.
Also, the list of libraries in the eclipse configuration is always sorted alphabetically which causes dependency problems. That is, if I move my libraries to the wpilib/user/cpp/lib folder (or create the placeholders in that folder) there are still problems because they get linked in the wrong order.
At this time the only solutions I have is to edit the properties of each project every time eclipse is opened and/or rename the libraries so their alphabetical order matches the dependency order.
The WPILib was recently changed to use -Og optimizations. This was done to enable us to use doubles throughout the library rather then floats. In order for user code to see this advantage, the plugins need to compile with -Og or greater. -Og still allows debugging, so that would be the best option I think.
C++ Debugging does not work properly in Eclipse Neon. The package bundling appears to have changed for RSE resulting in errors trying to create the RSE target. Even when the right package is installed to create the RSE target, the plugins still don't seem to be able to find it.
The last two years there's been a lot of bit-rot in the eclipse examples that had to be fixed at the last minute. To help avoid this, the examples should be built as part of the plugins build process.
Right now, we have 2 copies of libntcore.so
, libHALAthena.so
, and libwpiutil.so
in the plugins, one for C++ and 1 for Java. We might want to combine these into one folder location, potentially in core
so we don't have multiple copies of the same libraries, along with multiple copies of the debug objects
During testing, 3512 noticed that our roboRIO wasn't running the latest version of our code. We determined this was due to the Eclipse C++ plugins always deploying the Debug binary. When the build configuration is set to Release, the Release binary is not deployed as expected.
With #128, the download size of eclipse got bigger, and most of these libraries are duplicates between java and C++. We can combine these into a shared directory installed with common
and half the size of our download pretty much.
In order to improve 3rd party library support, we should switch the HAL and ntcore to be linked to shared instead of statically. The necessary changes have already been PR'd to allwpilib (wpilibsuite/allwpilib#291) and ntcore (wpilibsuite/ntcore#139). The changes we need in eclipse are as followed.
C++:
libHALAthena.so
and libntcore.so
from the c++ build libraries to the rio (probably /usr/local/frc/lib
Java:
nativelibraries.jar
file. We need the 2 files from that libwpilibJavaJNI.so
and libHALAthena.so
moved to a directory where it can be copied to the robot.libwpilibJavaJNI.so
, libHALAthena.so
and libntcore.so
get moved to the robot, most likely in /usr/local/frc/lib
.When doing this, we most likely want #27 as well.
The template generator for plugin strips the shared objects and puts the debug symbols into a separate file, named lib*.so.debug
. These are only needed for debugging, so they only need to be copied during debug mode, but we should add capability to do this for user libraries.
When the rpath changes (or goes away) for 2017, we need to add code in "updateVariables" in the CPPPlugin.java file to update 2016 projects so people don't need to make a new project.
#38 adds an md5 check to deploying libraries, but it is using checksum and totalproperty which results in 1 checksum per directory to copy from and uploading everything if anything changes.
We may be able to use the selector instead of to only copy the files that have changed.
Currently, built C++ binaries include debug information, resulting in a very large executable. Since we're using remote debugging, the deployed binary doesn't need to contain the debug information (only the local one used by the debugger for symbols). Stripping the deployed binary would significantly reduce its size, speeding up uploads and reducing flash wear on the target.
Each project template has the following comment:
If you change the name of this class or the package after creating this project, you must also update the manifest file in the resource directory.
Instead of referencing the manifest file, it should reference build.properties
Same as wpilibsuite/RobotBuilder#42
Netconsole-host was removed from the image, but is still quite useful for debugging (namely, riolog doesn't work without it). We should distribute the binary with the plugins and deploy it along with the shared libraries.
When you set the HOME env variable (I do this on Windows so I can put my dotfiles where I want them), the plugins unzips the wpilib folder to user home, not where I set it to. Then, actually building a program expects the wpilib folder to be in where I've set HOME to, not the user home. So I have two directories:
C:\Users\333fr\wpilib
- Where the wpilib folder is unzipped to.C:\otherdir\wpilib
- Where the eventual build expects to find the wpilib folder.If the mdns .local lookup fails, the deploy should try .lan.
When I'm on a network with a 10.* network with a netmask of 255.0.0.0 that does not have a roborio, the eclipse deploy reports that it found the roboRIO via Ethernet static.
When this occurs, and I ping the supposed IP address, ping reports destination host unreachable.
This appears to be an issue with ant and / or java isReachable method.
When the classpath is updated to add user libraries, absolute paths are used, which will cause issues if the classpath is kept in version control and used on different computers with different user names.
After running into an error running "gradlew build" it turned out I needed to run "gradlew updateDependencies". Neither the README.md nor the task name (I did not care what dependencies were included) suggested this.
Currently, all the examples are configured using an xml file. This makes it easy to add a new examples to the allwpilib repo, and it will then show up in eclipse. The same is not true for templates, which are configured completely in the plugin. This should be changed to use an XML file as well, to enable easier configuration and template creation.
We need to update the license in upon installation.
When in the Java perspective, the deploy command does not show up for C++. The reverse is not true: Java programs do not have this problem in the C++ perspective.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.