Skip to content

Problem with multiproject workspace : shows only the targets of the last build provider #23

@sporniket

Description

@sporniket

Description

I am trying to develop a new build provider. For now I have a dummy one with a method isEligible() that always returns true and return a dummy target.

However, in a workspace with 5 opened projects, I get only one of the expected target.

Image Image

For now, my workaround would be that my build provider class instances should manage a global map (one item per instance, identified by the working directory of the project) and the settings() method would return a concatenation of all the targets.

I believe that I have followed the directions described in the create-provider.md documents to get a valid minimal provider.

Also, while tinkering with my code, I could see that the settings() method of each instance of the provider is called.

And finally after a quick glance at target-manager.js->refreshTargets() I did not see where things could go wrong.

Steps to Reproduce

  1. clone this project https://github.com/sporniket/cmake-build-provider-for-pulsar
  2. invoke npm install to install dependencies
  3. invoke npm run rebuild-cjs to build the plugin
  4. invoke ppm to "install" this plugin
  5. invoke pulsar with a workspace with multiple projects

Expected behavior:
When displaying the target selection, one target per project should be listed, e.g here a capture of my workaround :

Image

Actual behavior:

Only one target appear, the target from the build provider instance that has been called last.

Reproduces how often:

Always

Versions

Pulsar  : 1.130.1-dev
Electron: 12.2.3
Chrome  : 89.0.4389.128
Node    : 14.16.0
ppm  2.7.0
npm  6.14.19-pulsar2
node 16.0.0 x64
pulsar 1.130.1-dev
python 
git 2.43.0

OS : Ubuntu 24.04.3 LTS

Additional Information

My workaround can be seen by checking out the branch named fix--buidium-fails-to-aggregate-all-the-targets, rebuild the plugin and restart.

In this workaround, each instance manage its targets in a global object, and the settings() method concatenates all the targets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions