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

add .umd.js.map files to Ng Apf files #767

Closed
wants to merge 1 commit into from

Conversation

Toxicable
Copy link

@Toxicable Toxicable commented May 16, 2019

PR Checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Feature (please, look at the "Scope of the project" section in the README.md file)

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

fixes #764 (comment)

@gregmagolan
Copy link
Collaborator

gregmagolan commented May 16, 2019

Oh, right. That's doesn't work because the map files end up in the ts_devserver bundle via scripts but actually need to be in data. Thanks for putting this up.

@Toxicable Does adding the map files manually to data get you the stack traces you expect?

They should make it there automatically but the question is what is the cleanest path?

  1. adds a scripts_maps the NodeModuleSources provider and have those picked up by sources_aspect into dev_maps
  2. makes scripts in NodeModuleSources both .js & the .map files and have sources_aspect put .js files into dev_scripts and .map files into dev_maps
  3. makes scripts in NodeModuleSources both .js & the .map & the sources_aspect dev_scripts have both & have ts_devserver & ts_web_test_suite sort between .js & .map files in dev_scripts

(1) seems least desirable since sources in NodeModuleSources is already a mixed bag of files so no reason that scripts can be both .js files and .map so I think it's probably either (2) or (3)

Thought?

/cc @alexeagle @kyliau

@alexeagle
Copy link
Collaborator

We need a failing test that demonstrates a broken source map. Somehow we need a node program that looks like the actual client, and uses source-map-support to assert that the stack traces map back to the right .ts lines

@Toxicable
Copy link
Author

I started on a PR which would act like a editor to check the paths produced by source maps
#722

This could be extended to include colunm and line checks

@alexeagle
Copy link
Collaborator

@Toxicable could you re-base on #848 and fix the test?

@gregmagolan
Copy link
Collaborator

@Toxicable could you re-base on #848 and fix the test?

#848 merged :)

@Toxicable
Copy link
Author

@gregmagolan @alexeagle Done

@Toxicable
Copy link
Author

CI failing due to:

12 06 2019 19:23:14.661:WARN [middleware:karma]: Invalid file type (map), defaulting to js.

Looks like something is picking up the map files, and trying to test them

@Toxicable
Copy link
Author

probably needs to be rewritten with the changes to generate_build_file.js, will do if there's interest in the related ticket

@Toxicable Toxicable closed this Dec 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

karma_web_test should resolve .umd.js.map files
4 participants