Git Product home page Git Product logo

symlinks-buck2-sample's Introduction

A sample project that shows the issues with symlinks and buck2.

You will need to install:

The setup

This repository has a very basic pnpm workspace with two node packages - thing1 and thing2. Thing1 has a workspace dependency on Thing2.

To reproduce

To reproduce the issue, run:

buck2 build //:pnpm-install

You can then change the version number of thing1/package.json to a different number, and run buck2 build //:pnpm-install again. If this is the first time the buck daemon has started (and there were no node_modules directories), you will see buck2 run pnpm install due to the updated source. You can then do the same with thing2/package.json and it will also work.

Now do:

buck2 clean

Followed by another

buck2 build //:pnpm-install

Now the buck2 daemon will have the node_modules folders in the tree. If you change thing1/package.json and run buck2 build //:pnpm-install again, things will work as expected. But then change thing2/package.json - and the target will fail to register that any source has changed.

In short

  • If the buck2 daemon is started when the node_modules hierarchy exists
  • And there are workspace dependencies between two packages
  • Buck2 will track the symlink from thing1/node_modules/thing_2/package.json, rather than the 'real' thin2/package.json.

symlinks-buck2-sample's People

Contributors

adamhjk avatar

Watchers

 avatar

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.