Comments (9)
Golden file verification does indeed does seem like useful functionality we may want to put into bazel-skylib. For one, Stardoc tests re-implement golden file verification from scratch, and I assume there are a number of places similar is done.
Would you mind writing a brief proposal and circulating to [email protected] ? I'd like some user feedback before we commit to an API :) We should try to motivate the exact API with some desired usage.
We should also try to ensure the rule is platform-agnostic (and thus works for no-Bash Windows, much like the work done in #86)
from bazel-skylib.
@c-parsons, thanks for your response.
Golden file verification does indeed does seem like useful functionality we may want to put into bazel-skylib. For one, Stardoc tests re-implement golden file verification from scratch, and I assume there are a number of places similar is done.
I know that rules_typescript
, rules_closure
and a few other rules have also implemented something like this, not to mention the couple that I've implemented in my own personal projects. We are well past the rule of three.
Would you mind writing a brief proposal and circulating to [email protected] ? I'd like some user feedback before we commit to an API :) We should try to motivate the exact API with some desired usage.
What would you think of a PR as the proposal. It's nice to have a design doc but this shouldn't be extremely complex to implement and we could have a specific discussion about the exact API.
Would you mind writing a brief proposal and circulating to [email protected] ? I'd like some user feedback before we commit to an API :) We should try to motivate the exact API with some desired usage.
I would be very happy to do that. Do you have any tips/suggestions/pitfalls that I need to look out for? I assume that Windows compatibility is the hard one to come by, but don't have a box that runs it. Any suggestions for that?
from bazel-skylib.
What would you think of a PR as the proposal. It's nice to have a design doc but this shouldn't be extremely complex to implement and we could have a specific discussion about the exact API.
That's fine -- just send a brief introduction email and link to the PR to bazel-dev to give that forum some notice there's something to look at!
I would be very happy to do that. Do you have any tips/suggestions/pitfalls that I need to look out for? I assume that Windows compatibility is the hard one to come by, but don't have a box that runs it. Any suggestions for that?
Unfortunately not my area of expertise :\ cc @laszlocsomor
from bazel-skylib.
FYI there's already such a rule in @bazel_tools
: https://github.com/bazelbuild/bazel/blob/25d2a3cd2b9701bc5c4b3d481ec0b05e8d134703/tools/build_rules/test_rules.bzl#L306
This rule doesn't work on Windows at the moment -- I tried fixing it but had to roll back: bazelbuild/bazel#6122
IMO this rule should live in skylib, not in bazel_tools. Moving it out might break existing users though. We can discuss possible approaches.
In any case I'm happy to answer question about rule development pifalls on Windows. (Which I'll hopefully get around to document once, see bazelbuild/bazel#3889.)
@achew22 if you work for Google, talk to @philwo about requesting access to Bazel team's testing Windows VM on GCP (which isn't fancy in any way, just a vanilla Windows image with Bazel and some compilers + tools already installed).
from bazel-skylib.
+1 for moving file_test
from @bazel_tools
to skylib.
We can revisit its design at the same time, if we need.
from bazel-skylib.
Is it okay for the core Bazel to depend on starlib? Should I move it over and add a dependency on starlib? How should I handle places where that rule is used in the core repo?
from bazel-skylib.
We check in a copy of everything Bazel depends on, for better or worse.
So you would copy Skylib to Bazel's //third_party
directory, add a local_repository
rule to Bazel's WORKSPACE
, and use it like so.
from bazel-skylib.
I think this was fixed by #136
@tetromino want to close it? (I'd be happy to sign up as a maintainer for bazel-skylib if the load is currently too high)
from bazel-skylib.
Ping @tetromino ☝🏻
from bazel-skylib.
Related Issues (20)
- Expand make variables in write_file content and expand_template substitutions HOT 4
- Bazel skylib fails on Bazel@HEAD in downstream CI HOT 2
- zlib not found HOT 2
- [feature] Add repository rule for translation of "properties" file into a .bzl HOT 3
- Gazelle plugin just deleting `srcs` from some libraries HOT 7
- analysis_test_e2e_test is failing with Bazel@HEAD HOT 7
- bazel-skylib is failing at BAZEL@HEAD HOT 2
- Search runfiles in `select_file` rule HOT 1
- Error in rule: Use of Starlark transition without allowlist attribute '_allowlist_function_transition' with Bazel@HEAD HOT 3
- Version 1.4.2 is broken in bzlmod HOT 2
- Requesting New Release/Tag
- Set up publish-to-bcr for skylib HOT 2
- Brings in very old version of rules_cc: Eliminate or update? HOT 2
- ERROR: no such package '@@rules_java~7.1.0~toolchains~remote_java_tools with BAZEL@HEAD HOT 2
- RELEASE NOTES TYPO FOR 1.5.0: Missing comma for WORKSPACE sha256
- `build_test` shows test as cached even if the build was not up-to-date HOT 1
- `diff_test` relies on a `diff` binary being installed on the host
- paths method performance
- NullPointerException with bazel@HEAD in CI HOT 11
- Feature: allow custom mnemonic for copy_file HOT 5
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 bazel-skylib.