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

Import as library #268

Open
hz61p1 opened this issue Jan 8, 2022 · 5 comments
Open

Import as library #268

hz61p1 opened this issue Jan 8, 2022 · 5 comments

Comments

@hz61p1
Copy link
Contributor

hz61p1 commented Jan 8, 2022

I just can't take and import your backend into the project because of the used replaced package. I have to clone the repository and push it up the level of the project

@maebeam
Copy link
Contributor

maebeam commented Jan 10, 2022

This project isn't really intended to be used as a library. May I ask what pieces of it you are trying to use?

@hz61p1
Copy link
Contributor Author

hz61p1 commented Jan 10, 2022

To reuse api request and response structures

@maebeam
Copy link
Contributor

maebeam commented Jan 11, 2022

Gotcha. I looked into this and it seems like a hard problem to solve. Open to suggestions on how to remove the replace while still making it easy for devs to use a local version of core

@hz61p1
Copy link
Contributor Author

hz61p1 commented Jan 30, 2022

In GO 1.18, a workspace mode will be added, perhaps this is something that will be able to solve this issue out of the box, but it will also require updating everything to GO 1.18
I haven't tried it, if I have time, I'll try and unsubscribe

https://go.googlesource.com/proposal/+/master/design/45713-workspace.md

@hz61p1
Copy link
Contributor Author

hz61p1 commented Feb 3, 2022

I have tested and it works successfully, what will be required for this in general

  1. consider PR Fix version core#210 which fixes the import of the core as a library and update imports accordingly in other projects
  2. updated to go 1.18
  3. create a go.work file
  4. update the dockerfile assembly
  5. update docs
  6. update other repositories where the core is used

Тhe result is a profit in the form of simplified assembly and development for other developers))

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

3 participants
@hz61p1 @maebeam and others