Closed ashfaq-shaik closed 3 years ago
Hi @ashfaq-shaik, this is unfortunately expected. In SDK 1.9.0, you get a much nicer error message for this:
WARNING: Package names should have the format ^[A-Za-z][A-Za-z0-9]*(\-[A-Za-z][A-Za-z0-9]*)*$.
You may be able to compile packages with different formats, but you will not be able to
use them as dependencies in other projects. Unsupported package names or versions may
start causing compilation errors without warning.
This is unfortunately a limitation of some underlying libraries so at the moment, we cannot change that and you have to respect the restrictions on project names.
Understood.
In that case, may I suggest having a lint/build rule to not allow these characters in the project name. maybe the build should fail if '_' or other non compliant characters are used in the project name. Avoiding this at the original project build would weed out any un needed sideeffects when importing into a different project.
My suggestion, this should not be allowed You may be able to compile packages with different formats, but you will not be able to use them as dependencies in other projects.
. Rather you should not allow people to compile/build packages if the project name is non-compliant. This would reduce a lot a friction and troubleshooting
I do agree with you here. Note that the warning will be omitted when building the project not when you depend on it. The only reason it’s not an error is for backwards compatibility. At least for things like demos, not being able to depend on it doesn’t matter much so we only went for a warning. I expect, this will turn into an error at some point in the future.
Closing since we already warn and we keep it a warning for backwards compat.
Project 1, has a series of templates that are to be imported into Project 2 Project 1's daml.yaml config is as below
When project 1 is built, it gives petri_data_objects-1.0.0.dar
above dar is being added to project 2 via daml.yaml. config below
when I build Project 2. I receive the error below