I am migrating from a maven project to a bazel project. I can generate jar files to be used as dependencies when I want to generate java libraries. When I use them in my build file as deps it gives me the following error:
deps not allowed without srcs - move to runtime deps ?
Any ideas?
I got this error after having refactored away all code usages of the dependencies listed inside the BUILD file's deps = [ ... ]. The fix was to remove the entire deps section.
If you're making a java_binary, you can specify runtime_deps and a main_class.
See: https://docs.bazel.build/versions/master/be/java.html#java_binary
Related
hi i installed autoprefixer css via package install . node.js is installed and i think i did everything right but when i try running it this error is showing up:
Autoprefixer
Error: (node:20773) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /Users/"myusername"/Library/Application Support/Sublime Text/Packages/Autoprefixer/node_modules/postcss/package.json.
Update this package.json to use a subpath pattern like "./*".
(Use node --trace-deprecation ... to show where the warning was created)
can someone help me with it ?
thx
This is an issue with one of Autoprefixer's JavaScript dependencies, named postcss. The Autoprefixer plugin hasn't been updated in over a year, so some of its dependencies have grown a little stale. However, as detailed here, the fix is pretty straightforward.
Open the Terminal app, and type in
cd "~/Library/Application Support/Sublime Text/Packages/Autoprefixer"
(don't forget the quotes around the path, as it contains spaces)
Once in that directory, just run
npm update
and the JS deps should be updated. Restart Sublime, and you should be all set.
I found the same error:
[DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in
the "exports" field module resolution of the package at
.../node_modules/tslib/package.json.
Then I solved it by exploring in the file /node_modules/tslib/package.json and update the package.json file with the following.
"exports": {
...,
"./": "./*"
}
I'm trying to create a swift package from xcframework, the question is if the framework need to load certain resources from a .bundle file, should the bundle be part of the framework, ie. xcframework? I had the following files in the single zip file:
MyPackage.xcframework
MyPackage.bundle
And uploaded it to a host server, in my Package.swift:
targets: [
.binaryTarget(name: "MyPackage", url: "HOST/MyPackage.xcframework.zip", checksum: "CHECKSUM")
]
I can add the Swift Package to my project and use it, but at runtime it cannot find the .bundle file.
I found someone having the same problem:
https://devforum.zoom.us/t/bundling-the-zoom-sdk-within-a-swift-package/48400
Even having the .bundle file as dependency in the Package.swift, it doesn't work, unless the bundle file is manually copied into the project.
So my question is, should this bundle be part of the .xcframework file instead of being a standalone .bundle file along with the .xcframework file? Or if there's something else I can do?
Thanks!
You can use the new approach introduced in Swift 5.3 for bundling resources with your swift package as described here.
Currently, there are two rules that are supported: process rule and copy rule, process rule applies specific processing rules to your resource files depending on whether it is xib, storyboard etc.
In your case, you need to use copy rule to copy the .bundle resource in your app. By default copy rule will copy your file to the root directory of your app, you can decide to provide path to a folder instead if you want to copy your file with specific folder structure.
I am trying this, and it works great for terminal applications to reference $HOME/.pub-cache/bin
Can I use an activated local package from other local projects?
Steps:
1. pub global activate --source path . From package project
2. Then how to use this in another project pubspec.yaml dependencies: section?
I know I can use path, but this is much better for dynamic reference reasons.
If I add this in pubspect.yaml dependencies in the project using cli2 package:
dependencies:
cli2: 0.0.0 # name of: pub global activate --source path .
I get this error:
Because usecli2 depends on cli2 any which doesn't exist (could not find package cli2 at https://pub.dartlang.org), version solving failed.
pub global activate is to install Dart scripts from bin/ of a package as command line executables and is completely unrelated to adding dependencies to a project.
You can use relative paths to add local dependencies:
dependencies:
cli2
path: ../cli2
I am migrating my Cmake project to Bazel. At the root of my project is a build folder that I use to run Cmake.
To migrate to Bazel, I need to create a BUILD file at the root of my project. However, on macOS, I cannot create it due to the presence of my build folder.
Can I use a different name for Bazel's BUILD files? Or should I get rid of my build folder?
Bazel also supports using BUILD.bazel as the filename, which should resolve this issue (BUILD.bazel is preferred if both BUILD.bazel and BUILD exist).
Please try using that and see if it helps!
Is it possible to use rebar to create a simple project module skeleton that is not based on an OTP application ? Overall I want to use that project structure to become a library for other rebar generated applications.
The structure should be as follows:
/myprojectlib
/src
/ebin
/deps
The idea is to use it on the deps section of a rebar.config file:
{ deps, [myprojectlib] }.
At the moment, because myprojectlib is not a rebar project (and an OTP app) the rebar compilation fails with the message that it cannot identify myprojectlib, even if it is in the /deps directory of the target folder. I checked further and it appears that the deps of the rebar.config file only accepts other rebar projects, hence my need to create a simple rebar project which is not an OTP application.
Erlang libraries are apps. They are however called library apps.
You can create a sample library app with rebar create-lib libid=myprojectlib.