Comments (6)
Next scrooge sbt version will have a setting to disable this
scroogeThriftIncludeRoot := false
from scrooge.
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.
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:
from scrooge.
(if others agree, I'd be happy to submit a PR)
from scrooge.
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.
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)
- Parse failure. HOT 3
- Support Scala 2.13 RC1 and beyond HOT 10
- Support i8 type HOT 2
- scrooge-sbt-plugin fails to build
- Can 'passthrough_fields' be a private field if wanted when Scrooge generates codes (sbt plugin)? HOT 1
- building linter fails - util-logging_2.12:19.10.0-Snapshot not found in Maven repo HOT 3
- Generate traits decoupled from Thrift dependencies HOT 3
- Closing of finagle-thrift client with scrooge generated service HOT 2
- Scala 2.13 version deprecation warning HOT 1
- twitter.github.io/scrooge is missing HOT 2
- com.twitter.scrooge.ast.Field.default is not callable from Java
- Interested in adding support for typescript? HOT 3
- Feature Suggestion: Custom type adapters HOT 1
- MultiImporter warnings for duplicates due to root importer HOT 1
- Add configuration choice of getting an immutable type in code generation for `bytes` thrift type HOT 1
- Updating from Scala 2.12 -> 2.13: scala.collection.Seq changes HOT 12
- scrooge-generator: Update Apache Thrift `Processor.process` signature HOT 5
- Add option to generate higher-kinded-type service interface HOT 2
- Upgrading libthrift to a newer version, security vulnerabilities HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scrooge.