-
Notifications
You must be signed in to change notification settings - Fork 0
How to solve Privacy violation
vihuynh edited this page Sep 12, 2023
·
2 revisions
- Check Privacy violation $ docker compose exec web bin/packs check packs/hotel_catalog
packs/hotel_catalog/app/controllers/hotel_catalogs_controller.rb:7:39
Privacy violation: '::Hotel' is private to 'packs/hotel_management' but referenced from 'packs/hotel_catalog'.
Is there a public entrypoint in 'packs/hotel_management/app/public/' that you can use instead?
Inference details: this is a reference to ::Hotel which seems to be defined in packs/hotel_management/app/models/hotel.rb.
To receive help interpreting or resolving this error message, see: https://github.com/Shopify/packwerk/blob/main/TROUBLESHOOT.md#Troubleshooting-violations
packs/hotel_catalog/app/controllers/hotel_catalogs_controller.rb:27:13
Privacy violation: '::Hotel' is private to 'packs/hotel_management' but referenced from 'packs/hotel_catalog'.
Is there a public entrypoint in 'packs/hotel_management/app/public/' that you can use instead?
Inference details: this is a reference to ::Hotel which seems to be defined in packs/hotel_management/app/models/hotel.rb.
To receive help interpreting or resolving this error message, see: https://github.com/Shopify/packwerk/blob/main/TROUBLESHOOT.md#Troubleshooting-violations
packs/hotel_catalog/app/models/search_room_form.rb:7:20
Privacy violation: '::Hotel' is private to 'packs/hotel_management' but referenced from 'packs/hotel_catalog'.
Is there a public entrypoint in 'packs/hotel_management/app/public/' that you can use instead?
Inference details: this is a reference to ::Hotel which seems to be defined in packs/hotel_management/app/models/hotel.rb.
To receive help interpreting or resolving this error message, see: https://github.com/Shopify/packwerk/blob/main/TROUBLESHOOT.md#Troubleshooting-violations
packs/hotel_catalog/app/services/hotel_catalogs/search_hotel.rb:8:20
Privacy violation: '::Hotel' is private to 'packs/hotel_management' but referenced from 'packs/hotel_catalog'.
Is there a public entrypoint in 'packs/hotel_management/app/public/' that you can use instead?
Inference details: this is a reference to ::Hotel which seems to be defined in packs/hotel_management/app/models/hotel.rb.
To receive help interpreting or resolving this error message, see: https://github.com/Shopify/packwerk/blob/main/TROUBLESHOOT.md#Troubleshooting-violations
4 offenses detected
There were stale violations found, please run `packwerk update-todo`
- Solving