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

Use scons to track html changes #970

Closed
wants to merge 4 commits into from
Closed

Conversation

mcspr
Copy link
Collaborator

@mcspr mcspr commented Jun 22, 2018

  • Extract possible module candidate from headers (as mentioned in gitter)
  • gulpfile modified to support building only one .gz.h file with command line switch
  • Use scons to track changed files in html/ dir and call gulp when they are changed.
  • Scons has couple of useful methods to check program existence, command execution etc. Using them instead of raw python methods.
  • Checks for node and gulp.js, with warnings

codacy check does not like subprocess usage... but somehow does env.Execute in build_webui, which is sh -c

TODO: check textual parser from pio to avoid subprocess completely.
TODO2: chunked webui build. gziped files can be easily (hopefully) concat-ed together to have even more granular build even with arduino ide

@mcspr
Copy link
Collaborator Author

mcspr commented Jul 1, 2018

I did notice the softcfg branch making stock config.json bundled within firmware instead of using sets of defines. Scrap headers parser then?

@xoseperez
Copy link
Owner

xoseperez commented Aug 4, 2018

Sorry, missed this last comment. I have not yet decided how to "ship" configuration with the binaries. If you check the current code in softcfg you will notice that the hardware module is using the settings API to load default values. All those #elif defined will be replaced by runtime checks, of course.

@mcspr
Copy link
Collaborator Author

mcspr commented Aug 8, 2018

Oops. I did forget about this.

Considering this once more, simple check for 'html' changes each time does only work per-environment.
Maybe something like 'dot file_name dot hash_string/mtime_of_htmldir' nearby should be checked instead.

I did also try lib_ignore via same header values to shorten the build. Which did instantly break on sensors. Trying to reorder headers did not work and broke i2c definitions (and rebasing broke commit author, somehow) :/ Current layout has things pulling Arduino.h which does require prior framework location knowledge (core/esp8266 include dir etc.) that is not available in pre: extra script. SCons.cpp.PreProcessor does better at this, but needs changing every method to handle #defines instead of #includes (it does check but does not stop on #if/#else and ends up reading every #define statement in order)

OT And about softcfg... wouldn't same .bin files work? repo keeps jsons as both reference (which should work uploading to /config) and hardware profiles for compilation. Library headers are still bound to defines.

@mcspr mcspr closed this Sep 10, 2019
@mcspr mcspr mentioned this pull request Oct 9, 2019
34 tasks
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

Successfully merging this pull request may close these issues.

2 participants