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

fix the source code directory after the soft link #4425

Merged
merged 2 commits into from
Oct 19, 2024

Conversation

yangjinheng
Copy link
Contributor

To solve the problem of the disk full of code, I used soft links to move the directory where the code is saved, but the import path of the code generated by goctl is wrong

The problem occurs in tools/goctl/rpc/generator/mkdir.go SetPbDir()

d.ctx.Dir calculates the absolute path
pbDir does not calculate the absolute path
strings.TrimPrefix tries to remove d.ctx.Dir from pbDir but does not get a match

@yangjinheng
Copy link
Contributor Author

help

@kevwan @kesonan @kingxt

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


help

@kevwan @kesonan @kingxt

To solve the problem of the disk full of code, I used soft links to move the directory where the code is saved, but the import path of the code generated by goctl is wrong

The problem occurs in tools/goctl/rpc/generator/mkdir.go SetPbDir()

d.ctx.Dir calculates the absolute path
pbDir does not calculate the absolute path
strings.TrimPrefix tries to remove d.ctx.Dir from pbDir but does not get a match
To solve the problem of the disk full of code, I used soft links to move the directory where the code is saved, but the import path of the code generated by goctl is wrong

The problem occurs in tools/goctl/rpc/generator/mkdir.go SetPbDir()

d.ctx.Dir calculates the absolute path
pbDir does not calculate the absolute path
strings.TrimPrefix tries to remove d.ctx.Dir from pbDir but does not get a match
Copy link

codecov bot commented Oct 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.53%. Comparing base (8690859) to head (1f26ae1).
Report is 156 commits behind head on master.

Additional details and impacted files

see 4 files with indirect coverage changes

@kevwan kevwan added this pull request to the merge queue Oct 19, 2024
Merged via the queue into zeromicro:master with commit 796dd5b Oct 19, 2024
6 checks passed
@yangjinheng
Copy link
Contributor Author

👍thanks

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.

4 participants