brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

[CLOSED] JavaScript File Interference Problem #8732

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by sananaamir Wednesday Nov 05, 2014 at 23:40 GMT Originally opened as https://github.com/adobe/brackets/issues/9815


I don't exactly know how this message pops up. It has happened thrice already.

The description that I get is:

The file will no longer be processed for code hints, Jump to Definition or Quick Edit. Here is the screenshot. image

Here is the index.js file:

describe('app', function() {
    describe('initialize', function() {
        it('should bind deviceready', function() {
            runs(function() {
                spyOn(app, 'onDeviceReady');
                app.initialize();
                helper.trigger(window.document, 'deviceready');
            });

            waitsFor(function() {
                return (app.onDeviceReady.calls.length > 0);
            }, 'onDeviceReady should be called once', 500);

            runs(function() {
                expect(app.onDeviceReady).toHaveBeenCalled();
            });
        });
    });

    describe('onDeviceReady', function() {
        it('should report that it fired', function() {
            spyOn(app, 'receivedEvent');
            app.onDeviceReady();
            expect(app.receivedEvent).toHaveBeenCalledWith('deviceready');
        });
    });

    describe('receivedEvent', function() {
        beforeEach(function() {
            var el = document.getElementById('stage');
            el.innerHTML = ['<div id="deviceready">',
                        '    <p class="event listening">Listening</p>',
                        '    <p class="event received">Received</p>',
                        '</div>'].join('\n');
        });

        it('should hide the listening element', function() {
            app.receivedEvent('deviceready');
            var displayStyle = helper.getComputedStyle('#deviceready .listening', 'display');
            expect(displayStyle).toEqual('none');
        });

        it('should show the received element', function() {
            app.receivedEvent('deviceready');
            var displayStyle = helper.getComputedStyle('#deviceready .received', 'display');
            expect(displayStyle).toEqual('block');
        });
    });
});

Brackets release: Release 0.44 experimental build 0.44.0-14876 OS: Windows 7

core-ai-bot commented 3 years ago

Comment by redmunds Thursday Nov 06, 2014 at 03:10 GMT


@sananaamir Thanks for reporting this timeout. In Brackets 1.0, the timeout was increased from 10 seconds to 30 seconds -- can you try this version (or increasing the timeout in 0.44) to see if that helps?

core-ai-bot commented 3 years ago

Comment by sananaamir Tuesday Nov 11, 2014 at 22:06 GMT


@redmunds The problem seems to have been fixed after I updated to Brackets 1.0.

core-ai-bot commented 3 years ago

Comment by redmunds Tuesday Nov 11, 2014 at 22:59 GMT


Thanks for followup. Closing.

core-ai-bot commented 3 years ago

Comment by trazek Tuesday Dec 16, 2014 at 17:43 GMT


I have updated to Brackets 1.0 and happens to me intermittently. The file it complains about is never the same either.

Release 1.0 build 1.0.0-15191 (release 3f2eb90a4) Windows 7

error

(function () { angular.module("ecm")

.config(config)

/*
 * Description: Workflow state configuration
 */
.constant("workflowConfig", {});

////////////////////////////////////////////////
/*
 *  Name: config
 *  Description: Configure state informaiton for workflows
 *  Params:
 */
config.$inject = ["appStates", "workflowConfig"];

function config(appStates, workflowConfig) {
    workflowConfig.enrollment = enrollment(appStates);
}

/*
 *  Name: enrollment
 *  Description: Returns workflow object for the enrollment workflow
 *  Params:
 */
function enrollment(appStates) {
    return [appStates.enrollment.state, appStates.enrollmentZip.state, appStates.enrollmentAddress.state, appStates.enrollmentPlans.state];
}

})();

core-ai-bot commented 3 years ago

Comment by redmunds Tuesday Dec 16, 2014 at 18:32 GMT


@trazek Try increasing the timeout as described here.

core-ai-bot commented 3 years ago

Comment by trazek Tuesday Dec 16, 2014 at 21:05 GMT


Ok, I'll give it a shot and report back if I come across more issues. Thanks.

core-ai-bot commented 3 years ago

Comment by trazek Tuesday Dec 16, 2014 at 22:48 GMT


My .brackets.json file looks like this:

{ "sbruchmann.staticpreview.basepath": "C:/Users/aferguson/workspace/ecm-frontend/", "jscodehints.inferenceTimeout": 50000 }

Adding the "jscodehints.inferenceTimeout" line and increasing to from the default seems to have stopped my code hints all together. I still get the warning modal as well.

Is that the incorrect syntax?

core-ai-bot commented 3 years ago

Comment by redmunds Tuesday Dec 16, 2014 at 23:11 GMT


@trazek Yes, it's the correct syntax. But, if tern (the JS file parser) times out on a file, it will now wait 50 seconds (as opposed to the default 30 secs), before cancelling and reporting the file. So, this may delay the amount of time before it can finish parsing subsequent files. Do you get code hints after waiting a couple minutes?

core-ai-bot commented 3 years ago

Comment by trazek Wednesday Dec 17, 2014 at 14:36 GMT


Actually the code hints were coming up normally. I reduced the timeout to 35secs just in case, to avoid a long delay.

Do you know if a tool such as lineman (http://www.linemanjs.com/) which watches files during development could cause the interference?

core-ai-bot commented 3 years ago

Comment by redmunds Wednesday Dec 17, 2014 at 17:30 GMT


@trazek

Do you know if a tool such as lineman (http://www.linemanjs.com/) which watches files during development could cause the interference?

I suppose it could. If you can do some testing with and without lineman running and isolate your problem to that tool then please open an issue with the details.

core-ai-bot commented 3 years ago

Comment by trazek Thursday Dec 18, 2014 at 17:20 GMT


I reduced the timeout to 35000 and have been using lineman normally. So far, no issues. Hopefully everything is good. Thanks