Comments (6)
Can you give me a minimal example to replicate this error?
from google-libphonenumber.
This error depends on compiler flags. I use only goog.require('i18n.phonenumbers.PhoneNumberUtil');
in my code. But i compile my app with --jscomp_error=extraRequire
.
from google-libphonenumber.
All what you need is just removing extra require
. I can make pull request btw.
from google-libphonenumber.
You can't force jscomp_error flags by http API. So, I've built your lib locally with command like https://github.com/google/closure-library/blob/master/scripts/ci/compile_closure.sh
Google Closure Library: 8ae5ad82e6698575bc0e7efc88fd0b1b8be56e35
Google Closure Compiler: 20151216.2.0
$ java -jar "../google-closure-compiler/compiler.jar" \
-O ADVANCED \
--warning_level VERBOSE \
--jscomp_error=extraRequire \
--js='**.js' \
--js='!**_test.js' \
--js='!**test_module.js' \
--js='!**_perf.js' \
--js='!**tester.js' \
--js='!**promise/testsuiteadapter.js' \
--js='!**osapi/osapi.js' \
--js='!**svgpan/svgpan.js' \
--js='!**alltests.js' \
--js='!**\./node_modules**.js' \
--js='!**protractor_spec.js' \
--js='!**protractor.conf.js' \
--js='!**browser_capabilities.js' \
--js /path/to/google-libphonenumber/src/asyoutypeformatter.js \
--js /path/to/google-libphonenumber/src/phonenumberutil.js \
--js /path/to/google-libphonenumber/src/phonemetadata.pb.js \
--js /path/to/google-libphonenumber/src/metadata.js \
--js /path/to/google-libphonenumber/src/phonenumber.pb.js \
--js_output_file=result.js
/path/to/google-libphonenumber/src/asyoutypeformatter.js:38: ERROR - 'i18n.phonenumbers.PhoneMetadataCollection' goog.require'd but not used
goog.require('i18n.phonenumbers.PhoneMetadataCollection');
^
/path/to/google-libphonenumber/src/asyoutypeformatter.js:39: ERROR - 'i18n.phonenumbers.PhoneNumber' goog.require'd but not used
goog.require('i18n.phonenumbers.PhoneNumber');
^
/path/to/google-libphonenumber/src/asyoutypeformatter.js:40: ERROR - 'i18n.phonenumbers.PhoneNumber.CountryCodeSource' goog.require'd but not used
goog.require('i18n.phonenumbers.PhoneNumber.CountryCodeSource');
^
/path/to/google-libphonenumber/src/asyoutypeformatter.js:41: ERROR - 'i18n.phonenumbers.PhoneNumberDesc' goog.require'd but not used
goog.require('i18n.phonenumbers.PhoneNumberDesc');
^
/path/to/google-libphonenumber/src/asyoutypeformatter.js:43: ERROR - 'i18n.phonenumbers.metadata' goog.require'd but not used
goog.require('i18n.phonenumbers.metadata');
^
/path/to/google-libphonenumber/src/phonenumberutil.js:45: ERROR - 'i18n.phonenumbers.PhoneMetadataCollection' goog.require'd but not used
goog.require('i18n.phonenumbers.PhoneMetadataCollection');
^
6 error(s), 0 warning(s)
from google-libphonenumber.
Sorry, I'm a little confused. This googlei18n/libphonenumber problem, not your wrapper. I'm going to close this ticket.
from google-libphonenumber.
Indeed, I'm only explicitly requiring what the lib is already expecting. Thanks for your feedback though! Let's see if it can be fixed upstream.
from google-libphonenumber.
Related Issues (20)
- Error messages for validation failure HOT 2
- Function to get the area code HOT 4
- Diferent result for fixed line number HOT 1
- Use of eval is strongly discouraged as it poses security risks HOT 1
- libphonenumber +1 and +1 864 HOT 2
- **号码正则判断有问题 HOT 1
- Not correct validation for south africa number HOT 1
- Issue with AU mobile phone numbers HOT 2
- Adopt upstream version scheme HOT 3
- Please update metadata HOT 2
- Missed Tagged Phone Number as Invalid HOT 1
- AU Number Validation - 0493 776 XXX not valid.
- Georgia country Regex not working for few numbers.
- These phone numbers 07700900982 and +447708900982 are not valid
- Updating
- Not accepting 368 areacode
- Valid numbers are considered as invalid
- phoneUtil.parse is giving wrong result for nigerian number
- Currently behind google libphonenumber release 8.13.29 HOT 1
- Giving invalid number to a valid number HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-libphonenumber.