Git Product home page Git Product logo

Comments (8)

phated avatar phated commented on July 25, 2024

I'm not getting this error, can you provide some more information?

from undertaker.

mikehaas763 avatar mikehaas763 commented on July 25, 2024

I couldn't reproduce this on my personal computer tonight so I'll try it on my work computer again tomorrow which is the original computer I had the problem on.

from undertaker.

mikehaas763 avatar mikehaas763 commented on July 25, 2024

I spent some time trying to track down the issue again. It seems to only be happening when I use a custom registry. I have a very basic custom registry which inherits from undertaker-registry.

'use strict';

var util = require('util');
var DefaultRegistry = require('undertaker-registry');

module.exports = BuildTasksRegistry;

util.inherits(BuildTasksRegistry, DefaultRegistry);
function BuildTasksRegistry() {
    DefaultRegistry.call(this);

    this.set('clean', function(done) {
        console.log('cleaning');
        done();
    });
}

My gulpfile is also very simple

'use strict';

var gulp = require('gulp');
var BuildTasksRegistry = require('./gulp/BuildTasksRegistry.js');

var buildTasks = new BuildTasksRegistry();
gulp.registry(buildTasks);

I can successfully run the command gulp clean. However, like I mentioned originally gulp --tasks results in that error being thrown.

I'm using undertaker-registry version 0.0.3
with gulpjs/gulp#4.0 branch

When I step into gulp and therefore into undertaker I notice the assignment to meta in tree.js.

var meta = metadata.get(task);

Looking at the contents of the metadata module that's being used in the line above, I can see it's simply a new instance of a WeakMap being exported. However, that WeakMap instance has never had any keys set. Therefore meta is undefined from the metadata.get(task) evaluation.

Does it look like I'm doing anything wrong or do you know what the metadata section is supposed to actually do?

from undertaker.

aleogr avatar aleogr commented on July 25, 2024

Same error here

from undertaker.

phated avatar phated commented on July 25, 2024

@mikehaas763 can you please check out #25 - we have a new way of defining custom tasks (in an init method on the registry). The init method receives the undertaker instance so metadata can be tracked. Please try this feature out with the https://github.com/phated/undertaker/tree/registry-init branch and let me know how things go. I want to get as many people trying it out as possible before I cut a release. Thanks.

from undertaker.

phated avatar phated commented on July 25, 2024

Specific commit 21cafaa

from undertaker.

phated avatar phated commented on July 25, 2024

@mikehaas763 pinging

from undertaker.

phated avatar phated commented on July 25, 2024

I believe this was closed by e7bf5b3 - Please reopen if changing to the init lifecycle hook doesn't solve this problem

from undertaker.

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.