-
Notifications
You must be signed in to change notification settings - Fork 234
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
mcrun and mcconfig should have the same env vars by default #1024
Comments
I agree with your bottom line point here, but your statement of the problem is a little off in a way that matters when considering solutions.
That is not quite right. What's actually happening is that most Moddable SDK examples (and, subsequently, most apps that people build) include "build": {
"BUILD": "$(MODDABLE)/build",
"MODULES": "$(MODDABLE)/modules",
"COMMODETTO": "$(MODULES)/commodetto",
"PIU": "$(MODULES)/piu"
} The right solution is probably to also include that block of variables in manifest_mod.json, which most Mods include. Could you try that out and see if it fixes this issue in a way that feels right to you? Just replace the contents of {
"build": {
"BUILD": "$(MODDABLE)/build",
"MODULES": "$(MODDABLE)/modules",
"COMMODETTO": "$(MODULES)/commodetto",
"PIU": "$(MODULES)/piu"
},
"platforms": {
"esp32/m5atom_echo": {
"build": {
"UPLOAD_SPEED": "1500000",
"DEBUGGER_SPEED": "1500000"
}
},
"esp32/m5atom_lite": {
"build": {
"UPLOAD_SPEED": "1500000",
"DEBUGGER_SPEED": "1500000"
}
},
"esp32/m5atom_matrix": {
"build": {
"UPLOAD_SPEED": "1500000",
"DEBUGGER_SPEED": "1500000"
}
},
"esp32/m5atom_u": {
"build": {
"UPLOAD_SPEED": "1500000",
"DEBUGGER_SPEED": "1500000"
}
},
"esp32/m5stack_core2": {
"build": {
"UPLOAD_SPEED": "1500000",
"DEBUGGER_SPEED": "921600"
}
},
"esp32/m5stick_c": {
"build": {
"UPLOAD_SPEED": "1500000",
"DEBUGGER_SPEED": "1500000"
}
},
"esp32/m5stick_cplus": {
"build": {
"UPLOAD_SPEED": "1500000",
"DEBUGGER_SPEED": "1500000"
}
}
}
} |
Ah, thanks for the clarification, I had not looked where the variable definitions come from and had assumed they were in the tools. 🙄 |
I don't think there's a strong reason to define PIU or COMMODETTO. The modules there aren't likely to be included by a mod, but provided by the host. I'm not sure BUILD is all that useful either. There's no harm in adding them, I suppose. But MODULE makes good sense With tomorrow's Moddable SDK update, we'll reject attempts to use a native module in a mod at build time, so mistakes will be caught early. |
In fact, there is at least one Piu module that is JavaScript-only. So... in the interest of consistency, I've updated the build section of manifest_mod to match manifest_base. |
Closing as proposed change committed. Note that there were also changes to provide much better error messages when attempting to use native modules with mcrun:
|
By default, manifests processed by mcconfig can use
$(MODULES)
while manifests processed by mcrun cannot. Please make the default env vars the same (I didn't check$(PIU)
, etc). I realize this can be worked around by specifying an explicitbuild
property but given that the docs for modules all have a section likeit's kind'a novice unfriendly.
Running mcrun without the work-around results in
The text was updated successfully, but these errors were encountered: