slachiewicz commented on PR #3944:
URL: https://github.com/apache/thrift/pull/3944#issuecomment-5818961404

   Hi @fishy,
   
   Thanks for the review!
   
   The motivation behind 
[THRIFT-6348](https://issues.apache.org/jira/browse/THRIFT-6348) is twofold:
   
   1. **State-dependent IDL resolution & tree sweeping:** `IncludesTest.thrift` 
and `NamespacedTest.thrift` have `include "ThriftTest.thrift"`. Before `make 
check` is run, `lib/go/test/ThriftTest.thrift` does not exist in the source 
tree, so IDEs, language servers, or any tree-wide `.thrift` sweeps fail to 
resolve the include. Once `make check` runs, it leaves a generated/ephemeral 
IDL copy sitting directly in the source directory.
   2. **Redundant copy in `test/go`:** `test/go/Makefile.am` was doing an exact 
`cp $(THRIFTTEST) ThriftTest.thrift` with zero edits, which is completely 
unnecessary since `$(THRIFTCMD)` can compile `$(THRIFTTEST)` directly.
   
   Regarding placing it in `gopath/`: I placed the filtered copy under 
`gopath/` simply because `gopath/` is already created and removed by 
`clean-local: $(RM) -r gopath`.
   
   If you prefer keeping `gopath/` strictly for Go packages, I can easily write 
the filtered copy to a dedicated directory like `build/ThriftTest.thrift` or 
`gen-thrift/ThriftTest.thrift` (and pass `-I build`) instead.
   
   Would you prefer a dedicated `build/` directory for the filtered file, or do 
you have a preferred location in mind?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to