Giter Site home page Giter Site logo

Comments (6)

muuki88 avatar muuki88 commented on June 11, 2024 2

Next scrooge sbt version will have a setting to disable this

scroogeThriftIncludeRoot := false

from scrooge.

felixbr avatar felixbr commented on June 11, 2024 1

Until the fix (#345) is merged and released, you can use the same workaround I used in our internal sbt-plugin to at least silence the warning:

  private val importerLogger = java.util.logging.Logger.getLogger("com.twitter.scrooge.frontend.Importer$")
  importerLogger.setLevel(java.util.logging.Level.OFF)

It's hacky but the best solution I could find for the time being 🙂

from scrooge.

jstultz avatar jstultz commented on June 11, 2024 1

I am not sure that the issue here is really that the root folder is included by default, but rather with the way absolute paths are handled. Any DirImporter will successfully resolve an absolute path, and when compiling a thrift file, it is the first file that the importer(s) resolve, and is going to be an absolute path. So while not including the root directory as an importer will solve this for some projects, it will still result in spurious warnings any time that a project has scroogeThriftIncludes with more than one entry (which would, I believe, be any project that has any dependencies in the thrift configuration?)

I believe conditioning the warning on a check like this would suffice to solve the problem more generally:

val file = new File(filename)
if (file.isAbsolute)

from scrooge.

jstultz avatar jstultz commented on June 11, 2024 1

(if others agree, I'd be happy to submit a PR)

from scrooge.

csaltos avatar csaltos commented on June 11, 2024 1

I've added Compile / scroogeThriftIncludeRoot := false to the Thrift configuration subprojects and it's working for me ... thank you very much for the fix and workarounds.

from scrooge.

niodice avatar niodice commented on June 11, 2024

Also seeing this quite a bit. I tend to ignore it and I always see the correct behavior in the generated code. This makes me think that @jstultz is correct in that these are spurious warnings.

Anyone maintainers have more context here?

from scrooge.

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.