golang liteide - could not parse action - build

I just installed and set up Lite Ide. When I try to run my simple "Hello World" program, I get these error messages,
Could not parse action 'Build'
Could not parse action 'Run'
Any ideas why I'm getting these errors?
Edit: When I go to View -> Manage GOPATH, the System GOPATH field shows up to be empty, even though I have the following in my bashrc:
export GOPATH=~/Desktop/go
export PATH=$PATH:$GOPATH/bin

Related

How to log to stdout in Firefox C++ code?

I am trying to write a patch for Firefox and have problem getting my debug messages in the console or system's journals.
I often use printing to stdout instead of using debug tools and it proved to be not trivial in Firefox. So far I have built Firefox with mach withdebugging enabled:
$ hg clone https://hg.mozilla.org/mozilla-unified && cd mozilla-unified
$ ./mach configure --enable-debug --disable-optimize
$ ./mach build
I tried logging with printf and by defining a logger:
using mozilla::LogLevel;
static mozilla::LazyLogModule sLogger("example_logger");
and then logging debug messages this way:
MOZ_LOG(sLogger, LogLevel::Debug, ("The debug message goes here."));
// or
printf("What is going on here?");
I run Firefox with setting the verbosity flag to max level for my debugger:
MOZ_LOG="example_logger:5" ./mach run
I have modified mozilla-unified/editor/libeditor/EditorEventListener.cpp and I assume it is being instantiated. However none of these changes yielded any message printed to the console.
P.S. Before asking here I tried #introduction and #developers on irc.mozilla.org for two days and no body answered. I also read MDN docs but it mostly covers debugging and many of the pages are outdated (from 2000).

Worklight common build failing with "Failed to update main HTML file"

I have started getting the following all of a sudden and am not able to build and deploy my application all of a sudden.. Not able to figure out what caused this to start happening.
Error:
[2013-08-13 12:21:41]FWLST1040E: common build failed: Failed to update main HTML file 'C:\Users\ajay\AppData\Local\Temp\worklightBuildcommon8499642247565272374\preview\default\myapp.html'
[2013-08-13 12:21:41] Application 'mypp' with all environments build finished.
[2013-08-13 12:21:41] FWLST1035I: No environments to build.
The build and deploy is not working and I am not able to update the app in the simulator.. Has any one else faced this before?
#idan thanks for the answer. There is no /worklightBuildcommon* folder in temp.
But I found the problem.. It was a malformed HTML that was causing this error.. the HTML validator that runs never caught it - the fact that its giving a build error was misleading me to believe its a build time problem v/s bad html..
I cracked it by creating a new dummy app in the same project and just replacing the artifacts one at a time.. started with tht html first and hit the jackpot!
Navigate to C:\Users\ajay\AppData\Local\Temp\
delete the folder worklightBuildcommon8499642247565272374

System Call C++ with Weka

I'm writing a C++ project that will occasionally use a system call to Weka to get some machine learning information. First I'd like to ensure that the training model (training.model) is up to date. So, at the beginning of main, I call:
system("\"java weka.classifiers.trees.J48 -t ML_data.arff -d training.model\"");
That gives Error: could not find or load main class weka.classifiers.trees.J48. I know what that means, so I moved the entire Weka project folder, entitled Weka-3-6, to the directory in which my project is found. So then I tried:
system("\"java \Weka-3-6\\weka.classifiers.trees.J48 -t ML_data.arff -d training.model\"");
But that returns Error: could not find or load Weka-3-6\weka.classifiers.trees.J48.
I feel like I'm in the right neighborhood, but I can't get the slashes right, and I'd prefer not to mess with absolute paths because the folders have spaces and that makes it even messier. Any ideas? Help is greatly appreciated.
Open a terminal/cmd prompt and try to run your command in your terminal/cmd prompt. Following is an example cmd batch script for windows. Your problem is most likely java classpath settings not weka problem. If you succeed in following command, then try your command with again in c++.
SET WEKA_HOME=C:\Program Files\Weka-3-7
SET CLASSPATH=%CLASPATH%;%WEKA_HOME%\weka.jar
SET HEAP_OPTION=-Xms4096m -Xmx8192m
SET JAVA_COMMAND=java %HEAP_OPTION%
%JAVA_COMMAND% weka.core.SystemInfo

Firebreath plugin on windows fails to load in chrome

I am busy converting by existing firebreath plugin here to use gpgme instead of making calls via the OS and the gpg binary.
I have managed to get the code to compile in windows using VS 2010 on a x32 system but after loading the plugin into chrome I can not access the npapi code at all. Even simple version calls fails.
When loading the plugin I get no visible errors but when using sawbuck log viewer for chrome I get the erorr messages below.
.\renderer\webplugin_delegate_proxy.cc 347 PluginMsg_Init returned false
..\plugins\npapi\webplugin_impl.cc 271 Couldn't initialize plug-in
I have tried to use my code with both firebreath 1.4 and 1.6 and neither versions work. After some simple debugging it seems that using any code provided by gpgme (whether its called or not) causes the plugin to break.
I came to this conclusion by doing the following.
Created a new project with firebreath (versions 1.4 and 1.6)
Add the gpgme.h headers to gmailGPGAPI.cpp and changed nothing else aside from adding the required reference paths to the project.
Build the project to create the dll (this generates the dll fine).
Replace the existing ddl in my project with the dll in step 2 and test it with the following piece of code
plugin = document.createElement('object'); plugin.id = 'plugin';
plugin.type = 'application/x-gmailtest';
document.body.appendChild(plugin);
console.log("my plugin returned: "+ plugin.valid);
console.log("my plugin returned: " + plugin.version);
This returns valid = true and the version returns what ever i set it to.
I then modified gmailGPGAPI.cpp to now return the gpg version by calling gpgme_check_version(NULL) in the version method. I used that method because its probably the simplest returning function that I could test with.
Build the plugin and copy dll to chrome extension as in step 3-4. The plugin builds fine again as expected.
Load the plugin and try to execute the code in step 4 at which point it now just returns undefined for any property or method i try to access on the plugin. No errors are printed to the console or anywhere else in chrome except for the error logged to sawbuck.
I have got no idea where to look or what to try since I cant seem to get an actionable error to work against. I have also reduced by test code to the point where its just a new project with a one line change to make it easier to find the problem.
I should note the code in the repo builds fine in linux/OSX and loads into chrome correctly so I know at some level my code does work.
Two possible paths:
You may have a DLL dependency that isn't available which keeps the plugin from loading; if you run regsvr32 on it in the state where it doesn't work on chrome, does it work?
Your plugin may be loading and then crashing. Start chrome with --plugin-startup-dialog and then when it pops up a dialog warning you that a plugin is about to be loaded attach to that process and see if the process crashes. At this point you can also set breakpoints to try to figure out how far it gets.
Double check your metadata in PluginConfig.cmake as well; sometimes unusual characters in some fields can cause issues like this.

XCode and SenTestingKit not outputting to the editor window

I am new to testing in Xcode. I am following the developer documentation "iOS Developement Guide" Unit Testing Applications.
I have successfully added unit test bundles to my application with one failing test.
When I build the test target the output shows 1 error as expected but the editor does not show the expected error message under the failed test.
Does anyone know any configurations that need to be set to enable this feature?
Apples docs say:
"If the unit-test bundle is configured correctly, the build fails and Xcode displays an error message in the text editor."
TIA
Vital Clue:
- One thing I have noticed in my output window is the message "Command /bin/sh failed with exit code 1"
Try to follow this guide
Be double careful about when to set application target, and when to set Unit test target. It works fine for me though.
If Unit Test fail, there should be some messages shown in the console.