Title: Unsupported private class error doesn't throw on building library for production · Issue #17518 · angular/angular-cli · GitHub
Open Graph Title: Unsupported private class error doesn't throw on building library for production · Issue #17518 · angular/angular-cli
X Title: Unsupported private class error doesn't throw on building library for production · Issue #17518 · angular/angular-cli
Description: 🐞 Bug report Command (mark with an x) new build serve test e2e generate add update lint xi18n run config help version doc Is this a regression? i'm not sure Description when i export a component in the library module but not in the publi...
Open Graph Description: 🐞 Bug report Command (mark with an x) new build serve test e2e generate add update lint xi18n run config help version doc Is this a regression? i'm not sure Description when i export a component in...
X Description: 🐞 Bug report Command (mark with an x) new build serve test e2e generate add update lint xi18n run config help version doc Is this a regression? i'm not sure Description when i export a componen...
Opengraph URL: https://github.com/angular/angular-cli/issues/17518
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unsupported private class error doesn't throw on building library for production","articleBody":"# 🐞 Bug report\r\n\r\n### Command (mark with an `x`)\r\n\u003c!-- Can you pin-point the command or commands that are effected by this bug? --\u003e\r\n\u003c!-- ✍️edit: --\u003e\r\n\r\n- [ ] new\r\n- [x] build\r\n- [ ] serve\r\n- [ ] test\r\n- [ ] e2e\r\n- [ ] generate\r\n- [ ] add\r\n- [ ] update\r\n- [ ] lint\r\n- [ ] xi18n\r\n- [ ] run\r\n- [ ] config\r\n- [ ] help\r\n- [ ] version\r\n- [ ] doc\r\n\r\n\r\n### Is this a regression?\r\n\r\ni'm not sure\r\n\r\n### Description\r\n\r\nwhen i export a component in the library module but not in the public API\r\nthe build command throw errors only in normal mode, but in production mode it completes successfully\r\n\r\n## 🔬 Minimal Reproduction\r\n\r\nclone https://github.com/robertIsaac/test-library\r\nand run ng b and ng b --prod\r\n\r\nor generate from scratch\r\n\r\n```\r\nng new test-library --create-application=false\r\ncd test-library\r\nng generate library test-library\r\nng g c test-export --export\r\nng b\r\nng b --prod\r\n```\r\n\r\n## 🔥 Exception or Error\r\nboth commands should throw the following error\r\n\r\n\u003cpre\u003e\u003ccode\u003e\r\nUnsupported private class TestExportComponent. This class is visible to consumers via TestLibraryModule -\u003e TestExportComponent, but is not exported from the top-level library entrypoint.\r\n\u003c/code\u003e\u003c/pre\u003e\r\n\r\n\r\n## 🌍 Your Environment\r\n\u003cpre\u003e\u003ccode\u003e\r\n$ ng version\r\n\r\n _ _ ____ _ ___\r\n / \\ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|\r\n / △ \\ | '_ \\ / _` | | | | |/ _` | '__| | | | | | |\r\n / ___ \\| | | | (_| | |_| | | (_| | | | |___| |___ | |\r\n /_/ \\_\\_| |_|\\__, |\\__,_|_|\\__,_|_| \\____|_____|___|\r\n |___/\r\n \r\n\r\nAngular CLI: 9.1.1\r\nNode: 12.14.1\r\nOS: win32 x64\r\n\r\nAngular: 9.1.2\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... language-service, platform-browser, platform-browser-dynamic\r\n... router\r\nIvy Workspace: Yes\r\n\r\nPackage Version\r\n------------------------------------------------------------\r\n@angular-devkit/architect 0.901.1\r\n@angular-devkit/build-angular 0.901.1\r\n@angular-devkit/build-ng-packagr 0.901.1\r\n@angular-devkit/build-optimizer 0.901.1\r\n@angular-devkit/build-webpack 0.901.1\r\n@angular-devkit/core 9.1.1\r\n@angular-devkit/schematics 9.1.1\r\n@angular/cli 9.1.1\r\n@ngtools/webpack 9.1.1\r\n@schematics/angular 9.1.1\r\n@schematics/update 0.901.1\r\nng-packagr 9.1.1\r\nrxjs 6.5.5\r\ntypescript 3.8.3\r\nwebpack 4.42.0\r\n\u003c/code\u003e\u003c/pre\u003e\r\n\r\n**Anything else relevant?**\r\n\r\nit would be nice if --export command also update the public api file if it's running inside a library\r\n","author":{"url":"https://github.com/robertIsaac","@type":"Person","name":"robertIsaac"},"datePublished":"2020-04-21T12:04:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/17518/angular-cli/issues/17518"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:837364d4-6657-4532-d421-671f97cfe778 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 864A:CF0E0:19BFE0:2424D9:6964FAB9 |
| html-safe-nonce | 10a83e794a92266466049e69c59ebbb47c0931e94aa727757b660049cd54ac0b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NjRBOkNGMEUwOjE5QkZFMDoyNDI0RDk6Njk2NEZBQjkiLCJ2aXNpdG9yX2lkIjoiODU3MzIxOTkyMTA4MTk4OTgxNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3b86e55f480538db6ac6adb4060a491f50f98325480075fd54b682f5136f505d |
| hovercard-subject-tag | issue:603944268 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/17518/issue_layout |
| twitter:image | https://opengraph.githubassets.com/980f81001ee716875179db15fee2f4051e7d3bc01019124767a90b9d945fcec5/angular/angular-cli/issues/17518 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/980f81001ee716875179db15fee2f4051e7d3bc01019124767a90b9d945fcec5/angular/angular-cli/issues/17518 |
| og:image:alt | 🐞 Bug report Command (mark with an x) new build serve test e2e generate add update lint xi18n run config help version doc Is this a regression? i'm not sure Description when i export a component in... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | robertIsaac |
| hostname | github.com |
| expected-hostname | github.com |
| None | 003e962bf5ca78f3f8f71db2461c6a7f9cfcbe99b480d6aeddaef78d33e9161a |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 21cbf6733480c5c09366f15b8dc8b6953472172a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width