Code Monkey home page Code Monkey logo

goworks's People

Contributors

iharwell avatar sharwell avatar timkack avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

goworks's Issues

Struggling to build for NB 8.0.1

I was wondering if you could create an NBM for Netbeans 8.0.x?
I'd love to be able use NetBeans for my Go development.
It is a bit complicate to build I noted.

Allow finer-granularity test running

Currently tests can only be run on an entire Go workspace at once. It would be helpful to allow tests to be run at a finer granularity:

  • Test package
  • Test file
  • Test method

"Test Package" command reports no tests run

Project:

https://github.com/stretchr/testify

Package:

github.com/stretchr/testify/assert

Command:

go test -v github.com/stretchr/testify/assert

Output:

=== RUN   TestObjectsAreEqual
--- PASS: TestObjectsAreEqual (0.00s)
=== RUN   TestImplements
--- PASS: TestImplements (0.00s)
=== RUN   TestIsType
--- PASS: TestIsType (0.00s)
=== RUN   TestEqual
--- PASS: TestEqual (0.00s)
=== RUN   TestEqualFormatting
--- PASS: TestEqualFormatting (0.00s)
=== RUN   TestFormatUnequalValues
--- PASS: TestFormatUnequalValues (0.00s)
=== RUN   TestNotNil
--- PASS: TestNotNil (0.00s)
=== RUN   TestNil
--- PASS: TestNil (0.00s)
=== RUN   TestTrue
--- PASS: TestTrue (0.00s)
=== RUN   TestFalse
--- PASS: TestFalse (0.00s)
=== RUN   TestExactly
--- PASS: TestExactly (0.00s)
=== RUN   TestNotEqual
--- PASS: TestNotEqual (0.00s)
=== RUN   TestContains
--- PASS: TestContains (0.00s)
=== RUN   TestNotContains
--- PASS: TestNotContains (0.00s)
=== RUN   Test_includeElement
--- PASS: Test_includeElement (0.00s)
=== RUN   TestCondition
--- PASS: TestCondition (0.00s)
=== RUN   TestDidPanic
--- PASS: TestDidPanic (0.00s)
=== RUN   TestPanics
--- PASS: TestPanics (0.00s)
=== RUN   TestNotPanics
--- PASS: TestNotPanics (0.00s)
=== RUN   TestNoError
--- PASS: TestNoError (0.00s)
=== RUN   TestError
--- PASS: TestError (0.00s)
=== RUN   TestEqualError
--- PASS: TestEqualError (0.00s)
=== RUN   Test_isEmpty
--- PASS: Test_isEmpty (0.00s)
=== RUN   TestEmpty
--- PASS: TestEmpty (0.00s)
=== RUN   TestNotEmpty
--- PASS: TestNotEmpty (0.00s)
=== RUN   Test_getLen
--- PASS: Test_getLen (0.00s)
=== RUN   TestLen
--- PASS: TestLen (0.00s)
=== RUN   TestWithinDuration
--- PASS: TestWithinDuration (0.00s)
=== RUN   TestInDelta
--- PASS: TestInDelta (0.00s)
=== RUN   TestInDeltaSlice
--- PASS: TestInDeltaSlice (0.00s)
=== RUN   TestInEpsilon
--- PASS: TestInEpsilon (0.00s)
=== RUN   TestInEpsilonSlice
--- PASS: TestInEpsilonSlice (0.00s)
=== RUN   TestRegexp
--- PASS: TestRegexp (0.00s)
=== RUN   TestCallerInfoWithAutogeneratedFunctions
--- PASS: TestCallerInfoWithAutogeneratedFunctions (0.00s)
=== RUN   TestZero
--- PASS: TestZero (0.00s)
=== RUN   TestNotZero
--- PASS: TestNotZero (0.00s)
=== RUN   TestJSONEq_EqualSONString
--- PASS: TestJSONEq_EqualSONString (0.00s)
=== RUN   TestJSONEq_EquivalentButNotEqual
--- PASS: TestJSONEq_EquivalentButNotEqual (0.00s)
=== RUN   TestJSONEq_HashOfArraysAndHashes
--- PASS: TestJSONEq_HashOfArraysAndHashes (0.00s)
=== RUN   TestJSONEq_Array
--- PASS: TestJSONEq_Array (0.00s)
=== RUN   TestJSONEq_HashAndArrayNotEquivalent
--- PASS: TestJSONEq_HashAndArrayNotEquivalent (0.00s)
=== RUN   TestJSONEq_HashesNotEquivalent
--- PASS: TestJSONEq_HashesNotEquivalent (0.00s)
=== RUN   TestJSONEq_ActualIsNotJSON
--- PASS: TestJSONEq_ActualIsNotJSON (0.00s)
=== RUN   TestJSONEq_ExpectedIsNotJSON
--- PASS: TestJSONEq_ExpectedIsNotJSON (0.00s)
=== RUN   TestJSONEq_ExpectedAndActualNotJSON
--- PASS: TestJSONEq_ExpectedAndActualNotJSON (0.00s)
=== RUN   TestJSONEq_ArraysOfDifferentOrder
--- PASS: TestJSONEq_ArraysOfDifferentOrder (0.00s)
=== RUN   TestDiff
--- PASS: TestDiff (0.00s)
=== RUN   TestDiffEmptyCases
--- PASS: TestDiffEmptyCases (0.00s)
=== RUN   TestDiffRace
=== RUN   TestFailNowWithPlainTestingT
--- PASS: TestFailNowWithPlainTestingT (0.00s)
=== RUN   TestFailNowWithFullTestingT
--- PASS: TestFailNowWithFullTestingT (0.00s)
=== RUN   TestImplementsWrapper
--- PASS: TestImplementsWrapper (0.00s)
=== RUN   TestIsTypeWrapper
--- PASS: TestIsTypeWrapper (0.00s)
=== RUN   TestEqualWrapper
--- PASS: TestEqualWrapper (0.00s)
=== RUN   TestEqualValuesWrapper
--- PASS: TestEqualValuesWrapper (0.00s)
=== RUN   TestNotNilWrapper
--- PASS: TestNotNilWrapper (0.00s)
=== RUN   TestNilWrapper
--- PASS: TestNilWrapper (0.00s)
=== RUN   TestTrueWrapper
--- PASS: TestTrueWrapper (0.00s)
=== RUN   TestFalseWrapper
--- PASS: TestFalseWrapper (0.00s)
=== RUN   TestExactlyWrapper
--- PASS: TestExactlyWrapper (0.00s)
=== RUN   TestNotEqualWrapper
--- PASS: TestNotEqualWrapper (0.00s)
=== RUN   TestContainsWrapper
--- PASS: TestContainsWrapper (0.00s)
=== RUN   TestNotContainsWrapper
--- PASS: TestNotContainsWrapper (0.00s)
=== RUN   TestConditionWrapper
--- PASS: TestConditionWrapper (0.00s)
=== RUN   TestDidPanicWrapper
--- PASS: TestDidPanicWrapper (0.00s)
=== RUN   TestPanicsWrapper
--- PASS: TestPanicsWrapper (0.00s)
=== RUN   TestNotPanicsWrapper
--- PASS: TestNotPanicsWrapper (0.00s)
=== RUN   TestNoErrorWrapper
--- PASS: TestNoErrorWrapper (0.00s)
=== RUN   TestErrorWrapper
--- PASS: TestErrorWrapper (0.00s)
=== RUN   TestEqualErrorWrapper
--- PASS: TestEqualErrorWrapper (0.00s)
=== RUN   TestEmptyWrapper
--- PASS: TestEmptyWrapper (0.00s)
=== RUN   TestNotEmptyWrapper
--- PASS: TestNotEmptyWrapper (0.00s)
=== RUN   TestLenWrapper
--- PASS: TestLenWrapper (0.00s)
=== RUN   TestWithinDurationWrapper
--- PASS: TestWithinDurationWrapper (0.00s)
=== RUN   TestInDeltaWrapper
--- PASS: TestInDeltaWrapper (0.00s)
=== RUN   TestInEpsilonWrapper
--- PASS: TestInEpsilonWrapper (0.00s)
=== RUN   TestRegexpWrapper
--- PASS: TestRegexpWrapper (0.00s)
=== RUN   TestZeroWrapper
--- PASS: TestZeroWrapper (0.00s)
=== RUN   TestNotZeroWrapper
--- PASS: TestNotZeroWrapper (0.00s)
=== RUN   TestJSONEqWrapper_EqualSONString
--- PASS: TestJSONEqWrapper_EqualSONString (0.00s)
=== RUN   TestJSONEqWrapper_EquivalentButNotEqual
--- PASS: TestJSONEqWrapper_EquivalentButNotEqual (0.00s)
=== RUN   TestJSONEqWrapper_HashOfArraysAndHashes
--- PASS: TestJSONEqWrapper_HashOfArraysAndHashes (0.00s)
=== RUN   TestJSONEqWrapper_Array
--- PASS: TestJSONEqWrapper_Array (0.00s)
=== RUN   TestJSONEqWrapper_HashAndArrayNotEquivalent
--- PASS: TestJSONEqWrapper_HashAndArrayNotEquivalent (0.00s)
=== RUN   TestJSONEqWrapper_HashesNotEquivalent
--- PASS: TestJSONEqWrapper_HashesNotEquivalent (0.00s)
=== RUN   TestJSONEqWrapper_ActualIsNotJSON
--- PASS: TestJSONEqWrapper_ActualIsNotJSON (0.00s)
=== RUN   TestJSONEqWrapper_ExpectedIsNotJSON
--- PASS: TestJSONEqWrapper_ExpectedIsNotJSON (0.00s)
=== RUN   TestJSONEqWrapper_ExpectedAndActualNotJSON
--- PASS: TestJSONEqWrapper_ExpectedAndActualNotJSON (0.00s)
=== RUN   TestJSONEqWrapper_ArraysOfDifferentOrder
--- PASS: TestJSONEqWrapper_ArraysOfDifferentOrder (0.00s)
=== RUN   TestHTTPStatuses
--- PASS: TestHTTPStatuses (0.00s)
=== RUN   TestHTTPStatusesWrapper
--- PASS: TestHTTPStatusesWrapper (0.00s)
=== RUN   TestHttpBody
--- PASS: TestHttpBody (0.00s)
=== RUN   TestHttpBodyWrappers
--- PASS: TestHttpBodyWrappers (0.00s)
--- PASS: TestDiffRace (0.00s)
PASS
ok  	github.com/stretchr/testify/assert	1.019s

TEST SUCCESSFUL (total time: 3s)

Expected:

Test results window shows test results.

Actual:

Test results window says no tests were executed.

Doesn't launch on Ubuntu

When I launch the application

$ cd goworks/bin
$ ./goworks

it gives the following error.

: not found4: ./../etc/goworks.conf:
: not found9: ./../etc/goworks.conf:
: not found12: ./../etc/goworks.conf:
...

The config file exists and when I run the cat ./../etc/goworks.conf command it yields the content of the config file. It is a bit strange to me.

Opening the shell script in a text editor subl goworks

#!/bin/sh

#
# resolve symlinks
#

PRG=$0

while [ -h "$PRG" ]; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null`
    if expr "$link" : '^/' 2> /dev/null >/dev/null; then
    PRG="$link"
    else
    PRG="`dirname "$PRG"`/$link"
    fi
done

progdir=`dirname "$PRG"`
APPNAME=`basename "$PRG"`

if [ -f "$progdir/../etc/$APPNAME".conf ] ; then
    . "$progdir/../etc/$APPNAME".conf  # Maybe this line is causing the issue
fi
...

If Im not mistaken, the problem starts from inside the if condition.

I do not even know from where to start fixing this issue due to my limited knowledge on POSIX command line apps.

Support running 'go get'

As long as the workspace is configured as described in How to Write Go Code, GoWorks will load dependencies already obtained from go get. It will also refresh if a user manually runs go get from a separate command line. However, there is no way for a user to invoke go get from within GoWorks itself.

Open standard library files as read only

It's easy to navigate to files in the standard library. The following files should probably be opened as read only by default:

  1. The Go standard library ($GOROOT/src)
  2. Files under a vendor folder

Auto completion for imports does not work

Admittedly I have not looked deep into this yet, but auto completion of symbols in imports does not work.
Consider:

    package main
    import "fmt"

    func main() {
    fmt.Println("Hello, 世界")
        fmt. // <---- at the dot I do not get any suggestions from the fmt package
   }

The Netbeans ide log reports:

WARNING [org.tvl.goworks.editor.go.completion.GoCompletionQuery]: Unable to resolve unqualified link from qualifier: [receiverType methodExpr operand expression simpleStmt statement block body functionDecl topLevelDecl sourceFileBody]

License headers needs to be updated

It seems that the license blurb in the individual source files contradicts the project license text.
Here is a sample:

/*
 *  Copyright (c) 2012 Sam Harwell, Tunnel Vision Laboratories LLC
 *  All rights reserved.
 * 
 *  The source code of this document is proprietary work, and is not licensed for
 *  distribution. For information about licensing, contact Sam Harwell at:
 *      [email protected]
 */

This is problematic if I want to try to sort out the build failures on NB 8.1 - I do not want to sign CONTRIBUTING until I understand what license the project is under :)

Incorrect handling of packages without an alias

When an import is specified using a path without an alias given, the package identifier assigned to that import is expected to be the single package seen in source files in that location. Currently GoWorks assumes that the package name and the folder name are the same, but this is not always the case.

💡 A workaround when this occurs is to explicitly assign an alias to the import which happens to match the true name of the package:

// Broken:
import (
  "github.com/zalando/go-keyring/secret_service"
)

// Working:
import (
  ss "github.com/zalando/go-keyring/secret_service"
)

GoWorks fails to build on Netbeans 8.1 infrastructure

GSF was updated with changelist 280039 in Netbeans, changing a lot of TestRunner infrastructure and hence breaking the build of go.project.
I have been trying to why org.netbeans.modules.gsf.testrunner.api.TestSession changed.
Here is an example of building on NB 8.1:

org.tvl.goworks.project.taskdefs:
org.tvl.goworks.project.common-init:
org.tvl.goworks.project.projectized-common.basic-init:
org.tvl.goworks.project.basic-init:
org.tvl.goworks.project.files-init:
org.tvl.goworks.project.nbm-license-init:
org.tvl.goworks.project.build-init:
warning: had to upgrade dependencies for module org.tvl.goworks.project: added = [module org.netbeans.api.progress.compat8 > 1.40, module org.netbeans.api.templates > 1.0, module org.netbeans.api.progress.nb > 1.40, module org.netbeans.modules.projectuiapi.base/1 > 1.78.0, module org.openide.util.ui > 9.3, module org.openide.filesystems.nb, module org.openide.filesystems.compat8, module org.netbeans.modules.parsing.indexing > 9.0] removed = []; details: [#243100: Separate desktop-independent utilities, Separate projectuiapi into desktop and NetBeans independent and dependent parts, Separation of Parsing and Indexing APIs, Separation of desktop and cleanup, Swing dependencies split away, Templates API has been separated into its own module.]
org.tvl.goworks.project.init:
org.tvl.goworks.project.up-to-date:
org.tvl.goworks.project.compile:
Compiling 22 source files to /Users/tkack/NetBeansProjects/goworks/go.project/build/classes
warning: [options] bootstrap class path not set in conjunction with -source 1.7
/Users/tkack/NetBeansProjects/goworks/build/public-package-jars/org-netbeans-api-annotations-common.jar(org/netbeans/api/annotations/common/NonNull.class): warning: Cannot find annotation method 'when()' in type 'Nonnull': class file for javax.annotation.Nonnull not found
/Users/tkack/NetBeansProjects/goworks/build/public-package-jars/org-netbeans-api-annotations-common.jar(org/netbeans/api/annotations/common/CheckForNull.class): warning: Cannot find annotation method 'when()' in type 'Nonnull'
warning: Supported source version 'RELEASE_6' from annotation processor 'org.netbeans.modules.openide.util.NbBundleProcessor' less than -source '1.7'
warning: Supported source version 'RELEASE_6' from annotation processor 'org.netbeans.modules.gsf.testrunner.CoreManagerProcessor' less than -source '1.7'
warning: No processor claimed any of these annotations: org.netbeans.api.annotations.common.CheckForNull,org.netbeans.api.annotations.common.NonNull
/Users/tkack/NetBeansProjects/goworks/build/public-package-jars/org-netbeans-api-annotations-common.jar(org/netbeans/api/annotations/common/NonNull.class): warning: Cannot find annotation method 'when()' in type 'Nonnull': class file for javax.annotation.Nonnull not found
/Users/tkack/NetBeansProjects/goworks/build/public-package-jars/org-netbeans-api-annotations-common.jar(org/netbeans/api/annotations/common/CheckForNull.class): warning: Cannot find annotation method 'when()' in type 'Nonnull'
warning: No processor claimed any of these annotations: javax.annotation.Generated
/Users/tkack/NetBeansProjects/goworks/go.project/src/org/tvl/goworks/project/testing/GoTestOutputWriter.java:20: error: cannot find symbol
import org.netbeans.modules.gsf.testrunner.api.Manager;
  symbol:   class Manager
  location: package org.netbeans.modules.gsf.testrunner.api
/Users/tkack/NetBeansProjects/goworks/go.project/src/org/tvl/goworks/project/testing/nodes/GoCallstackFrameNode.java:11: error: cannot find symbol
import org.netbeans.modules.gsf.testrunner.api.CallstackFrameNode;
  symbol:   class CallstackFrameNode
  location: package org.netbeans.modules.gsf.testrunner.api
/Users/tkack/NetBeansProjects/goworks/go.project/src/org/tvl/goworks/project/testing/nodes/GoCallstackFrameNode.java:17: error: cannot find symbol
public class GoCallstackFrameNode extends CallstackFrameNode {
  symbol: class CallstackFrameNode
/Users/tkack/NetBeansProjects/goworks/go.project/src/org/tvl/goworks/project/testing/nodes/GoTestMethodNode.java:12: error: cannot find symbol
import org.netbeans.modules.gsf.testrunner.api.TestMethodNode;
  symbol:   class TestMethodNode
  location: package org.netbeans.modules.gsf.testrunner.api
/Users/tkack/NetBeansProjects/goworks/go.project/src/org/tvl/goworks/project/testing/nodes/GoTestMethodNode.java:19: error: cannot find symbol
public class GoTestMethodNode extends TestMethodNode {
  symbol: class TestMethodNode
/Users/tkack/NetBeansProjects/goworks/go.project/src/org/tvl/goworks/project/testing/nodes/GoTestRunnerNodeFactory.java:12: error: cannot find symbol
import org.netbeans.modules.gsf.testrunner.api.TestRunnerNodeFactory;
  symbol:   class TestRunnerNodeFactory
  location: package org.netbeans.modules.gsf.testrunner.api
/Users/tkack/NetBeansProjects/goworks/go.project/src/org/tvl/goworks/project/testing/nodes/GoTestRunnerNodeFactory.java:14: error: cannot find symbol
import org.netbeans.modules.gsf.testrunner.api.TestsuiteNode;
  symbol:   class TestsuiteNode
  location: package org.netbeans.modules.gsf.testrunner.api
/Users/tkack/NetBeansProjects/goworks/go.project/src/org/tvl/goworks/project/testing/nodes/GoTestRunnerNodeFactory.java:21: error: cannot find symbol
public class GoTestRunnerNodeFactory extends TestRunnerNodeFactory {
  symbol: class TestRunnerNodeFactory
/Users/tkack/NetBeansProjects/goworks/go.project/src/org/tvl/goworks/project/testing/nodes/GoTestRunnerNodeFactory.java:33: error: cannot find symbol
    public TestsuiteNode createTestSuiteNode(String suiteName, boolean filtered) {
  symbol:   class TestsuiteNode
  location: class GoTestRunnerNodeFactory
/Users/tkack/NetBeansProjects/goworks/go.project/src/org/tvl/goworks/project/testing/nodes/GoTestsuiteNode.java:11: error: cannot find symbol
import org.netbeans.modules.gsf.testrunner.api.TestsuiteNode;
  symbol:   class TestsuiteNode
  location: package org.netbeans.modules.gsf.testrunner.api
/Users/tkack/NetBeansProjects/goworks/go.project/src/org/tvl/goworks/project/testing/nodes/GoTestsuiteNode.java:17: error: cannot find symbol
public class GoTestsuiteNode extends TestsuiteNode {
  symbol: class TestsuiteNode
/Users/tkack/NetBeansProjects/goworks/build/public-package-jars/org-netbeans-api-annotations-common.jar(org/netbeans/api/annotations/common/NonNull.class): warning: Cannot find annotation method 'when()' in type 'Nonnull': class file for javax.annotation.Nonnull not found
/Users/tkack/NetBeansProjects/goworks/build/public-package-jars/org-netbeans-api-annotations-common.jar(org/netbeans/api/annotations/common/CheckForNull.class): warning: Cannot find annotation method 'when()' in type 'Nonnull'
11 errors
10 warnings
/Applications/NetBeans/NetBeans 8.1.app/Contents/Resources/NetBeans/harness/suite.xml:187: The following error occurred while executing this line:
/Applications/NetBeans/NetBeans 8.1.app/Contents/Resources/NetBeans/harness/common.xml:224: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 59 seconds)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.