Giter VIP home page Giter VIP logo

Comments (8)

mdjastrzebski avatar mdjastrzebski commented on May 18, 2024 1

@ShaswatPrabhat Thanks for working on this. I'm not sure I understand your question though.

The data flow between the packages should be the same as is now for branch and commit-hash CLI options. The difference should be that when Reassure 'measure' command does not receive either branch or commit-hash option then it tries to get the missing value(s) from Git if possible.

from reassure.

mdjastrzebski avatar mdjastrzebski commented on May 18, 2024 1

A good place for checking these values is the very beginning of "run" method in measure.ts in CLI package

from reassure.

mdjastrzebski avatar mdjastrzebski commented on May 18, 2024 1

Resolved by #211

from reassure.

ShaswatPrabhat avatar ShaswatPrabhat commented on May 18, 2024

Picking this up please.

Will it be a good idea to keep these values as default in measure.ts after auto detecting git based branches ?

from reassure.

ShaswatPrabhat avatar ShaswatPrabhat commented on May 18, 2024

@mdjastrzebski there were a couple of things I wanted to check:

  • Which way of spawning a child process would be preferable ? Right now I am looking at child_process.fork, but any notes regarding the same?
  • With the above approach the function becomes an IIFE like so:
  const simpleGit = require('simple-git');
  const git = simpleGit({ baseDir: process.cwd() });
  const branch = await git.revparse(['--abbrev-ref', 'HEAD']);
  const commitHash = await git.revparse(['HEAD']);
  process.send({ branch, commitHash });
})();

Please let me know if this is what you had thought of

from reassure.

mdjastrzebski avatar mdjastrzebski commented on May 18, 2024

I've looked more into the simple-git package. It seems that it's actually invoking git binary by itself, so we can give it a try.

from reassure.

ShaswatPrabhat avatar ShaswatPrabhat commented on May 18, 2024

This is how it is shaping up @mdjastrzebski .

Not very happy with the IIFE .

Can we not have a simple await based function call immediately in run() method ? Do we need a fork at all

from reassure.

ShaswatPrabhat avatar ShaswatPrabhat commented on May 18, 2024

And an alternative way

from reassure.

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.