Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to jump to dependency #212

Closed
mikesherov opened this issue Jun 13, 2016 · 7 comments
Closed

Error when trying to jump to dependency #212

mikesherov opened this issue Jun 13, 2016 · 7 comments
Labels

Comments

@mikesherov
Copy link

mikesherov commented Jun 13, 2016

project_settings: starting search for .deprc in:  /Users/sherov/code/***
project_settings: Closest folder with a deprc: /Users/sherov/code/***
project_settings: Using found .deprc within:  /Users/sherov/code/***/.deprc
node_dependents_editor_backend: node_path from settings:  
node_dependents_editor_backend: bin path /Users/sherov/Library/Application Support/Sublime Text 3/Packages/Dependents/node_modules/dependents-editor-backend/bin/cli.js
node_bridge: Node path: :/usr/local/bin
node_bridge: Executing:  node /Users/sherov/Library/Application Support/Sublime Text 3/Packages/Dependents/node_modules/dependents-editor-backend/bin/cli.js --filename=/Users/sherov/code/*** --get-config
command_setup: parsed config from backend {'nodePath': '', 'webpackConfig': '', 'buildConfig': '/Users/sherov/code/***/build.json', 'directory': '/Users/sherov/code/***', 'exclude': ['vendor'], 'requireConfig': '/Users/sherov/code/***', 'stylesRoot': '/Users/sherov/code/***'}
JumpToDependency: strings on line ['be/View/Follow']
JumpToDependency: space delimited words on line ['be/View/Follow']
JumpToDependency: Extracted Path {'path': 'be/View/Follow'}
project_settings: starting search for .deprc in:  /Users/sherov/code/***
project_settings: Closest folder with a deprc: /Users/sherov/code/***
project_settings: Using found .deprc within:  /Users/sherov/code/***/.deprc
node_dependents_editor_backend: node_path from settings:  
node_dependents_editor_backend: bin path /Users/sherov/Library/Application Support/Sublime Text 3/Packages/Dependents/node_modules/dependents-editor-backend/bin/cli.js
node_bridge: Node path: :/usr/local/bin
node_bridge: Executing:  node /Users/sherov/Library/Application Support/Sublime Text 3/Packages/Dependents/node_modules/dependents-editor-backend/bin/cli.js --filename=/Users/sherov/code/*** --lookup ***
JumpToDependency: After cabinet lookup 
BaseThread: Opening: 
Missing file {'filename': '', '_filename': 'BaseThread.py'}
error: Dependents

Can't find that file
Run_JumpToDependency {'modifier': None, 'etime': '1.8', '_filename': 'BaseThread.py'}
@mrjoelkemp
Copy link
Collaborator

Thanks for reporting the issue! I assume the *** portions were redactions for privacy (just want to make sure).

The parsed requireConfig value (generated from the config value in your .deprc file) doesn't seem to have a file extension (not sure if you accidentally redacted that portion). Please double-check that value – since without a requirejs config, the be/View/Follow path wouldn't resolve to an actual file.

To help me identify the cause better, you can supply debug info via:

DEBUG=* node /Users/sherov/Library/Application\ Support/Sublime\ Text\ 3/Packages/Dependents/node_modules/dependents-editor-backend/bin/cli.js --filename=/Users/sherov/code/*** --lookup *** | pbcopy

  • Put the redactions back when executing the command
  • Paste the output into a file and remove any private information
  • Please paste that edited debug information on this thread

Any additional info is appreciated. Thanks in advance!

@mikesherov
Copy link
Author

Sent you an email with the information.

@mikesherov
Copy link
Author

Thanks!x

@mikesherov
Copy link
Author

looks like resolved location is something /assets/js/assets/js, if I removed the baseUrl from the require config, it suddenly works.

@mrjoelkemp
Copy link
Collaborator

Thanks for the details. Will look into it further tonight. The culprit is the fact that your baseUrl has a leading slash. According to the requirejs spec, that has special resolution logic.

Though I think there's room for your baseUrl to become ./ (which is what it defaults to if you don't supply one) and still work in prod, I'd rather add a special rule in my amd resolver to handle the leading slash case (avoiding the redundant baseUrl of assets/js/assets/js).

I'll try to get in a fix tonight and have that released to package control so that you can update Dependents tomorrow morning.

Thanks again.

mrjoelkemp added a commit to dependents/node-module-lookup-amd that referenced this issue Jun 14, 2016
RequireJS would resolve that about the html page referencing loading
the app. Since that context is missing, we'll fix the resolution
directory to avoid duplicating the baseUrl in the resolved
filepath.

Ref dependents/Dependents#212
mrjoelkemp added a commit to dependents/node-dependents-editor-backend that referenced this issue Jun 14, 2016
mrjoelkemp added a commit that referenced this issue Jun 14, 2016
* ES6 correctly parses JSX and ES7 source files using Babylon
* AMD fix for baseUrls with a leading slash.
 * Fixes #212
@mrjoelkemp
Copy link
Collaborator

That was precisely it. I pushed the fix all the way through and submitted it for a package control release (should be available as a Dependents package update in an hour). Please let me know if the fix doesn't resolve your issue.

I imagine this bug would have also broken the Find Dependents feature. Thanks a ton for reporting it.

Please feel free to report any additional bugs or pain points.

@mrjoelkemp
Copy link
Collaborator

FYI, this bug fix has been propagated to Find Dependents. The other features (view tree and find entry points) will get this fix shortly. Thanks again for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants