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

Problem using force-di as a submodule in managed package #96

Open
alastairbrownfairsailcom opened this issue Jan 8, 2024 · 3 comments

Comments

@alastairbrownfairsailcom

I am trying to deploy force-di as part of a managed package rather than package it as an external dependency. I have included force-di as a submodule and i am trying to deploy the code without modification into a scratch org with a namespace.

The deployment errors because the test suite metadata requires the names of the test classes to be prefixed by the namespace.

I would like the test suite to be modified or removed so that the repo can be deployed into an org with a namespace as is so that i don't have to fork the force-di repo or find some other means to make local changes.

I could copy the code and manually add the namespace prefix but this is a poor developer experience and means we are less likely to use the latest verison of the repo.

Without the namespace prefix i get the following error when deploying the repo into an org with a namespace:

Deploying v58.0 metadata to test-op4lffgkghvd@example.com using the v59.0 SOAP API.
Deploy ID: 0Af3G0000116L3qSAE
Status: Failed | ████████████████████████████████████████ | 1/1 Components (Errors:1) | 0/0 Tests (Errors:0)

Component Failures [2]

| Type Name Problem
| ───── ─────────────────── ─────────────────────────────────────────
| Error force_di_teststuite No classes found for di_BindingParamTest.
| Error force_di_teststuite No classes found for di_BindingParamTest.

@rygramer
Copy link

rygramer commented Feb 2, 2024

You could add the test suite you don't want deployed to your forceignore file

@alastairbrownfairsailcom
Copy link
Author

Thanks. Obvious really.

@alastairbrownfairsailcom
Copy link
Author

Unfortunately using forceignore does not work. There is a forceignore in the force-di submodule. When using sf project deploy start it overrides the one from the parent to include the test suite metadata event though it was excluded at the parent level. I could fork the force-di repo but that creates a maintenance overhead and is what i was trying to avoid.

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

No branches or pull requests

2 participants