Giter VIP home page Giter VIP logo

lavender's People

Contributors

laszlocsomor avatar plule-ansys avatar tmandry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

lavender's Issues

[WinError 206] The filename or extension is too long

Hello, thanks for creating this tool! I'm having an issue with long file paths when trying to build a Visual Studio solution for tensor flow. The error is below.

DEBUG: C:/tmp/vkiilvyk/external/org_tensorflow/third_party/repo.bzl:109:14:
Warning: skipping import of repository 'pybind11' because it already exists.
Loading: 169 packages loaded
Traceback (most recent call last):
File "C:\Storage\lavender-master\generate.py", line 470, in
main(sys.argv)
File "C:\Storage\lavender-master\generate.py", line 465, in main
run_aspect(cfg)
File "C:\Storage\lavender-master\generate.py", line 209, in run_aspect
subprocess.check_call([
File "C:\Python38\lib\subprocess.py", line 359, in check_call
retcode = call(*popenargs, **kwargs)
File "C:\Python38\lib\subprocess.py", line 340, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Python38\lib\subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Python38\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 206] The filename or extension is too long

What I have tried/verified:

  • Removed Win10 long path restrictions using [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
    "LongPathsEnabled"=dword:00000001
  • added the following to my bazel.rc file:
    startup --output_user_root=C:/tmp
    startup --windows_enable_symlinks
    build --enable_runfiles
  • Enabled 8.3 filename support via "fsutil 8dot3name set 0"
  • Ensured that BAZEL_SH is set systemwide

I'm not sure what else it could be, other than maybe that the maximum path length limitation is still being applied within Python or some other tool. Any ideas or support would be greatly appreciated!

How to resolve: unknown repo 'bazel-msbuild' requested from @@

When I run the command in the source folder, I get the following error:

(env)  % python ../lavender/generate.py -o ../vs-cpp-template
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
 checking cached actions
Loading: 0 packages loaded
ERROR: Unable to find package for @@[unknown repo 'bazel-msbuild' requested from @@]//bazel-msbuild:msbuild.bzl: The repository '@@[unknown repo 'bazel-msbuild' requested from @@]' could not be resolved: No repository visible as '@bazel-msbuild' from main repository.

I see the msbuild.bzl in the lavender folder along with the package name but why is it not getting picked up automatically by generate.py?

Debugger, error messages go to file in bazel exec_root

bazel sets up a junction so that file paths in its exec_root (where it runs the compiler) point to the files/directories in the original source directory.

However, Visual Studio doesn't realize this, and thinks the files at the different paths are distinct. This breaks IntelliSense, modify/save behavior, etc when in the exec_root "upside-down".

Error: Information about the C++ toolchain API is not accessible anymore through ctx.fragments.cpp

Hello and first, thanks for making this!

It seems that a bazel change broke Lavender. When trying to convert a project, I get:

Information about the C++ toolchain API is not accessible anymore through ctx.fragments.cpp (see --incompatible_disable_legacy_cpp_toolchain_skylark_api on http://docs.bazel.build/versions/master/skylark/backward-compatibility.html#disable-legacy-c-configuration-api for migration notes). Use CcToolchainInfo instead.

The link provides instructions for migration, but I just started learning Bazel so I did not manage to fix it myself. Removing the + ctx.fragments.cpp.compiler_options([]) + ctx.fragments.cpp.cxx_options([]) parts from msbuild.bzl allows the script to complete.

Add acceptance/regression testing

Testing lavender's integration with Visual Studio is going to be difficult.

As a first step, let's just have a test that runs bazel, generates project files, and compares them to a known good output.

Test against Python 2 and 3.

One or more projects in the solution were not loaded correctly

I tried Commit: 184656b [184656b] with Bazel 0.26.0 and Visual Studio 2019 and Visual Studion 2017 on a HelloWorld example.

HelloWorld/WORKSPACE

workspace(name = "HelloWorld")

HelloWorld/BUILD

cc_binary(
    name = "HelloWorld",
    srcs = ["main.cpp"],
)

HelloWorld/main.cpp

#include <iostream>
using namespace std;

int main() {
	cout << "Hello World!" << endl;
}

I switched in Powershell to my HelloWorld folder (E:/dev/BazelDemos/HelloWorld) and typed:

python C:\lavender\generate.py
start .\msbuild\HelloWorld.sln

When Visual Studio starts it shows me "One or more projects in the solution were not loaded correctly. Please see Output Window for details"

Output window reports: " Project E:\HelloWorld.vcxproj" could not be found."

The HelloWorld.vcxproj file is located under E:\dev\BazelDemos\HelloWorld\msbuild\HelloWorld.vcxproj

When I open the generated solution file (HelloWorld.sln) in a text editor line 5 looks like this:

Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloWorld","\HelloWorld.vcxproj", "{00000000-0000-3000-A000-00003D2EF56C}"

If I change it to (removing the backslash character "")

Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloWorld", "HelloWorld.vcxproj", "{00000000-0000-3000-A000-00003D2EF56C}"

I can open the solution

Pick the toolset automatically

Right now generated projects are hardcoded to use Visual Studio 12.0 (2013). This causes annoying prompts in later versions of Visual Studio.

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.