How to keep generated source code for proto files in bazel? - bazel

I have studied https://blog.bazel.build/2017/02/27/protocol-buffers.html . The project I want to hack on is written in Go. At the moment, if I run the build command I can see the compiled binary but I don't see the *.pb.go files anywhere. I want to keep the generated *.pb.go files in the same folder where *.proto files are so that my IDE (Intellij Goland) can find and index them.
Can you please help me how to get this working? If you can show me how to do that for the github.com/cgrushko/proto_library project, I should be able to try that in my particular project.

Bazel will not output generated files (such as .pb.go) into the source tree. They go into the output directories (bazel-out/<config> or bazel-genfiles/<config>). Temporary solution might be to add those as source roots to goland. The real solution is to use https://ij.bazel.build/. It has some Go support, and the team is actively working on improving it.

Related

How to add library paths in Delphi 10

I am trying to install GLscene but getting problems with the source file locations.
It says in the install instructions to add the GLscene source directories into the global library path in tool/options/Delphi options/Library, which I have done but it has no effect.
I can add the source directories into each package project directory and it then compiles, but I would rather have it accessible globally.
The GLscene library items I have entered are,
C:\Users\Andy\Documents\Embarcadero\Studio\Projects\GLScene_VCL\Source
C:\Users\Andy\Documents\Embarcadero\Studio\Projects\GLScene_VCL\Source\Shaders
C:\Users\Andy\Documents\Embarcadero\Studio\Projects\GLScene_VCL\Source\DesignTime
Which are all correct,
anybody know any reason why the compiler can't find the files in these directories?
The compiler will search for source files on the library path. Note that there are separate library paths for different targets, e.g. Win32, Win64 etc.
If you have source files that cannot be found, then they are not in the library path that you specified.
Personally I don't like the approach of using search paths for source files. I like everything under my project directory so that I can check out from my VCS and have everything I need to build right there. A search path based approach makes serious development very difficult because you cannot maintain branches. What if you have old versions to maintain that use old versions of your libraries?
Well this is a bit late but it could help someone else.
Try and add the paths to both the Library Path and the Debug DCU Path.
Recent Delphi versions have different build configurations for Release and Debug and my guess is that the Debug configuration only searches in the Debug DCU Path.

Difference between Xcode's file adding options

I was just working with a sample project that uses Tesseract OCR library. I followed compiling and building the library as it was mentioned in the link. There the author mentioned precisely to add files one by creating groups and other by creating references. At times we need to carefully check these values or else you will fail to compile. What is actually going on? I just want to know the reasons behind choosing each particular option?
Thanks in advance
If you choose Create groups the files will actually be located in one folder, but in Xcode they will appear grouped the way you had them in the folders.
If you choose Create folder Xcode will create folders in your project directory and the structure will be like the structure of the imported folder/folders.

ios - why do most instructions say "uncheck copy items into the destination folder" when adding libraries to project?

It seems that the files should indeed be copied into the destination folder...no? What am I missing here?
Most of the time various tutorials seem to say that button should be unchecked. But it seems like that is better to check.
Could someone please explain the distinction to me?
This is just about project management. If you download some files from the web say, then add them to your project, you probably want to copy them. Then you can delete the originals and you will still have a copy in your project. Alternatively, you download a folder of code and move it to a folder on your machine where you keep 3rd party code. Now when you add the code to your project you probably do not want to copy the code so that in the future if you fix a bug in the code it is available in all projects where you're using that (shared) code.
It's very much about personal preference and how you're managing the code files on your machine, in and between projects.
Not copying == leave the files where they are.
Copying == save the files inside the project so I don't loose them.

iOS: How to Backup a Project?

What's the best way to backup a project?
To be more specific: I have a DropBox account and I prefer to have a copy of the project over there.
I assume I should copy all the h+m files.
Can I copy all the xib files? does it make any sense?
Can/Should I copy all the jpg/png/mp3 files that I use for resources?
Is there a proper way to do that, like a "backup project" button where I can select the target and it compresses the project in some smart way?
You need all of those and the project files, etc. Look in the project file to see all files referenced. Check to see if you have everything by making a copy and trying to build from the copy. You'll get complaints if you missed any thing.
The best way to backup a project is source control. There are many options available to get free or very cheap remote source control repositories where you can store a copy (and history) of your source. Checkout http://www.beanstalkapp.com or http://www.github.com for a start.
Best thing is to copy the entire directory where all your project exists. Copy this directory to your dropbox folder. To open the project open yourproject.xcodeproj with xcode.
Although this method is okay for one time thing or when you are the only one working on your project but in the long run you should look at trying to adopt a source control versioning system like GIT. Xcode has wonderful integration with GIT.
Hope this helps...

Inter-project dependencies

I'm doing some Delphi (2010) work this summer, and I've stumbled upon this problem:
My project consists of reusable backend library and a bunch of GUIs that tap into its interface. In this circumstances I've decided to make the backend and GUIs separate projects within single project group (I hope my train of thought is correct). The problem is, how can I include units from the backend in a GUI project?
I've tried to modify Project Options > Directories and Conditionals but compiler still complains about being unable to find proper .dcu's.
Any ideas? Your help will be appreciated.
In D2010, the Directories and Conditionals in the project option refers to (and is specific for?) the resource compiler.
I guess what you are looking for is the Project Options->Delphi Compiler->Search Path
Search where the compiler is generating the DCU files. (2)
In project options you must add the source directory on you have de PAS files (1) or the directory where compiler generate de DCU files.
(1) In the "Search path" edit.
(2) This directory is the "Unit Output Directory" edit.
Regards

Resources