Giter Club home page Giter Club logo

Comments (9)

c-parsons avatar c-parsons commented on June 16, 2024

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.

achew22 avatar achew22 commented on June 16, 2024

@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.

c-parsons avatar c-parsons commented on June 16, 2024

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.

laszlocsomor avatar laszlocsomor commented on June 16, 2024

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.

laurentlb avatar laurentlb commented on June 16, 2024

+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.

achew22 avatar achew22 commented on June 16, 2024

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.

laszlocsomor avatar laszlocsomor commented on June 16, 2024

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.

alexeagle avatar alexeagle commented on June 16, 2024

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.

alexeagle avatar alexeagle commented on June 16, 2024

Ping @tetromino ☝🏻

from bazel-skylib.

Related Issues (20)

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.