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

remove generated code from the repo #113

Open
tivvit opened this issue Aug 23, 2022 · 8 comments
Open

remove generated code from the repo #113

tivvit opened this issue Aug 23, 2022 · 8 comments
Assignees

Comments

@tivvit
Copy link
Member

tivvit commented Aug 23, 2022

provide simple makefile which will regen all those (in docker = no user deps needed)

@tivvit
Copy link
Member Author

tivvit commented Aug 23, 2022

maybe server does not have to be the exception

@malytomas
Copy link
Member

npm requires absolute path to "link" the generated client into the website, which makes it impossible to do it inside the docker :(

@tivvit
Copy link
Member Author

tivvit commented Aug 25, 2022

I do not understand what that means. What is the essential part Docker environment is missing to be able to do this?

@tivvit tivvit changed the title remove generated code from the repo (apart from the server) remove generated code from the repo Aug 25, 2022
@malytomas
Copy link
Member

visualization has two pieces of generated code:

  • /web/js/client/* which is generated in docker by visualization-gen
  • /web/js/bundle.js which is generated by npm from index.js and the client

generating the bundle requires full path to the client, but it uses the index.js, which is modified outside the docker during development..

@malytomas
Copy link
Member

it might be possible to make npm run inside the docker, but it would need to do so even during development.
furthermore, my intention with committing the bundle.js was that you/anyone can run the website without any dependencies..
i am conflicted about this..

@malytomas
Copy link
Member

i am using the same generated client for my js bot too. but that would hopefully still work..

@malytomas
Copy link
Member

malytomas commented Aug 25, 2022

in the end - i think that it would be ok to remove generated code for the server, and keep the code for python and javascript.
reasoning: the server is always run inside the docker, which can easily generate the code for itself. but javascript and python scripts should be runnable even without the need to generate any code (aka without installing docker). others will be using visualization and bots and they should be able to do so with as minimum setup as possible.

@malytomas
Copy link
Member

Conclusion:

  • move example bot into separate github repository for easy forking
    • include generated code
  • keep generated bundle.js for web, do not commit generated client.js (no changes here)
  • remove generated code for go server, it can generate it before compilation

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