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 the model name instead of fully qualified path #7152

Merged
merged 2 commits into from Feb 15, 2021

Conversation

adeas31
Copy link
Member

@adeas31 adeas31 commented Feb 12, 2021

Fixes #5796. Avoid creating long path by only using the model name

Fixes OpenModelica#5796. Avoid creating long path by only using the model name
@adeas31 adeas31 added the COMP/GUI/OMEdit Issue and pull request related to OMEdit label Feb 12, 2021
@adeas31 adeas31 self-assigned this Feb 12, 2021
@adeas31
Copy link
Member Author

adeas31 commented Feb 12, 2021

@casella now the file name prefix is automatically set to the model name unless specified explicitly. I also set the generated folder name to model name. This PR guarantees the unique folder name by appending the timestamp with the folder name. We add 16 characters extra for timestamp compared to long fully qualified paths.

@casella
Copy link
Contributor

casella commented Feb 12, 2021

@casella now the file name prefix is automatically set to the model name unless specified explicitly.

Good.

I also set the generated folder name to model name. This PR guarantees the unique folder name by appending the timestamp with the folder name. We add 16 characters extra for timestamp compared to long fully qualified paths.

I'm not 100% sure about this idea, because it will generate one new directory each time you simulate. In fact it's good if you want to keep all past results, it isn't if you don't, because your temp directory will very soon fill up with old stuff.

What do you think?

@adeas31
Copy link
Member Author

adeas31 commented Feb 12, 2021

Yes it will clutter the temp directory. Then I guess we should just stick to filename prefix solution and keep the folder name same as before i.e., fully qualified.

@casella
Copy link
Contributor

casella commented Feb 12, 2021

Maybe we could leave your solution for the directory with name + timestamp as an option?

@adeas31
Copy link
Member Author

adeas31 commented Feb 15, 2021

Yes that one alternate to keep both functionalities but perhaps not needed. For now the folder name is fully qualified path and the generated files use just the model name.

@adeas31 adeas31 merged commit 423386c into OpenModelica:master Feb 15, 2021
@adeas31 adeas31 deleted the ticket-5796 branch February 15, 2021 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
COMP/GUI/OMEdit Issue and pull request related to OMEdit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Models with long path names cause a code generation failure under Windows
2 participants