Giter VIP home page Giter VIP logo

Comments (12)

fkorotkov avatar fkorotkov commented on May 28, 2024

Do you see instruments_src_test_java_test module?

Also could you please also provide idea.log(Help -> Reveal log in Finder). But before please add com.twitter.intellij.pants.service.project.PantsResolver to you debug category(Help -> Configure Debug Log Settings). Don't forget to reimport the project so the debug info will be logged.

from intellij-pants-plugin.

ericzundel avatar ericzundel commented on May 28, 2024

No, I didn't see that string in there.

When I ran pants goal depmap I'm seeing that the command is failing:

FAILURE: Unsupported for target Resources(BuildFileAddress(/Users/zundel/Development/java/instruments/acceptance/src/test/resources/BUILD.gen, resources))

Here is the BUILD file:

$ cat /Users/zundel/Development/java/instruments/acceptance/src/test/resources/BUILD.gen

resources(name='resources',
  sources = rglobs('*') - globs('BUILD*'),
  dependencies = [],
)

instruments.json:
https://gist.github.com/ericzundel/79e2c66498e8d7798d8e

from intellij-pants-plugin.

tejal29 avatar tejal29 commented on May 28, 2024

Did you run with --depmap-project-info flag.

depmap goal only works on java/scala targets

from intellij-pants-plugin.

ericzundel avatar ericzundel commented on May 28, 2024

Followup to the previous comments. We determined that the error running

pants goal depmap <target>

without the --depmap-project-info takes a different codepath that won't tickle the same exception. I sent Tejal & Fedor a idea.log file with the requested debugging enabled.

from intellij-pants-plugin.

ericzundel avatar ericzundel commented on May 28, 2024

Also, I confirmed that when using pants goal idea instruments:: the test paths are mapped into the project.

from intellij-pants-plugin.

fkorotkov avatar fkorotkov commented on May 28, 2024

You have instruments/src/test/java:test target and instruments/src/test/java:lib. instruments/src/test/java:test depends on instruments/src/test/java:lib and also seems it has sources that is not needed because it's already depends on instruments/src/test/java:lib.

But it should work anyway. Still looking into the problem.

from intellij-pants-plugin.

fkorotkov avatar fkorotkov commented on May 28, 2024

Found the problem. My bad.

Fix: https://rbcommons.com/s/twitter/r/1141/

from intellij-pants-plugin.

ericzundel avatar ericzundel commented on May 28, 2024

I am still seeing this issue after upgrading to Plugin version 1.0.1 . If you look at the Project View, you can see that the instruments_src_test_java_lib target is mapped in, but none of the sources are on a test path.

screen shot 2014-10-21 at 4 45 14 pm

from intellij-pants-plugin.

ericzundel avatar ericzundel commented on May 28, 2024

I hope this gives some insight. I tried to re-create something that looks like our BUILD file structure in this branch https://github.com/ericzundel/pants/tree/zundel/plugin-repro

You can use the targets from the command line:

./pants goal compile testprojects/maven_layout/hello/src/main/java:lib
./pants goal test testprojects/maven_layout/hello/src/test/java:test
./pants goal run testprojects/maven_layout/hello

The project view doesn't look the same as my original report, but the symbols aren't resolving either.

screen shot 2014-10-21 at 5 41 30 pm

from intellij-pants-plugin.

fkorotkov avatar fkorotkov commented on May 28, 2024

It works for me even with your weird test targets. The only problem I see it's marked as just a source root and not as test root.

But the import is grey because you can remove it, it's the same package. There are no unresolved symbols in the file.

from intellij-pants-plugin.

ericzundel avatar ericzundel commented on May 28, 2024

Ok, thanks for the followup. Looks like I need a better repro case.

from intellij-pants-plugin.

ericzundel avatar ericzundel commented on May 28, 2024

I've just upgraded to version 1.1.1. Thus far my tests are loading in so I'm going to close this issue. If something similar comes up I'll re-open or create a new issue with more details.

from intellij-pants-plugin.

Related Issues (20)

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.