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

About track->"Copy config" includes baseUri entries on UriLocation objects #3884

Closed
cmdcolin opened this issue Aug 29, 2023 · 3 comments · Fixed by #4040
Closed

About track->"Copy config" includes baseUri entries on UriLocation objects #3884

cmdcolin opened this issue Aug 29, 2023 · 3 comments · Fixed by #4040
Labels
bug Something isn't working

Comments

@cmdcolin
Copy link
Collaborator

I feel like this should be filtered out

@cmdcolin cmdcolin added the bug Something isn't working label Aug 29, 2023
@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Oct 4, 2023

This is actually an oddly deep problem. There is code here for example that 'looks like it is filtering out baseUri'

postProcessor: snap => {
// xref https://github.com/mobxjs/mobx-state-tree/issues/1524 for Omit
const { baseUri, ...rest } = snap as Omit<typeof snap, symbol>
if (!baseUri) {
return rest
}
return snap
but actually it just filters out undefined baseUri

And, it is not valid to change it to filter out baseUri there because it is needed after RPC serialize/deserialize

Alternative approaches could be attaching e.g. baseUri to the "mst environment" or something like this, but it may be challenging

@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Oct 4, 2023

initial assessment from pairing with @garrettjstevens yesterday :)

@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Nov 3, 2023

the way that this works at the level of the jbrowse config is here

{
// eslint-disable-next-line @typescript-eslint/no-explicit-any
postProcessor(snapshot: Record<string, any>) {
return removeAttr(clone(snapshot), 'baseUri')
},
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant