Skip to content

the latest patch release prevents jit-grunt from working #159

@travi

Description

@travi

Things have seemed a bit off for a while, but I finally took the time to dig in and realized that jit-grunt was no longer being used, even though my working config had not changed in several of my projects.

My projects still load load-grunt-config as:

require('load-grunt-config')(grunt, {
        jitGrunt: {
            staticMappings: {
                cucumberjs: 'grunt-cucumber',
                ...
            }
        }
    });

With 0.19.2, my build output shows that all tasks are being loaded up-front:

Execution Time (2016-07-17 19:31:23 UTC)
loading tasks           1.9s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 12%
loading grunt-webpack  381ms  ▇▇▇ 2%
webpack:build          13.3s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 82%
babel:dist             524ms  ▇▇▇▇ 3%
Total 16.2s

If I downgrade to 0.19.1, jit-grunt appears to be used again, resulting in tasks loading more separately:

Execution Time (2016-07-17 19:37:07 UTC)
loading tasks           1.4s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 11%
loading grunt-webpack  221ms  ▇▇▇ 2%
webpack:build          10.3s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 82%
babel:dist             567ms  ▇▇▇▇▇▇ 5%
Total 12.5s

The important part of this issue is that some of my tasks depend on grunt-env to configure environment variables before tasks are executed. When all tasks are loaded up-front, some of them end up causing build failures because of premature parsing and execution.

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