Skip to content

Renaming fields within fat structs doesnt see to work #1677

Description

@Nogbit

It might be my fault, but I've been using nvim for some time now with Odin.

This is with the latest Odin and Ols branches, linux.

Reproduction Steps

  1. try to rename window to test, from within shared.odin. It works, but misses the rename of thread_data.config.display.window.resolution.x in renderer.odin...window stays as just that. Expected it to get renamed
  2. Do the same in reverse, start the rename from within renderer.odin and it will rename the upstream in shared.odin but not the ones in the file that initiated the rename.
  3. Same results when doing a search for files that have/use window, it wont return the results in renderer.odin.

ose/renderer/renderer.odin

package renderer

import sdl "vendor:sdl3"
import "../engine"
import "../shared"

renderer_init :: proc(thread_data: ^engine.Thread_Data) {  
    width:    = thread_data.config.display.window.resolution.x
    height:   = thread_data.config.display.window.resolution.y
}

ose/engine/types.odin

package engine

import "../shared"

Thread_Data :: struct {
    config: shared.Config,
}

ose/shared/shared.odin

Window_Config :: struct {
    resolution:            Vector2i,
}

Display_Config :: struct {
    window: Window_Config,
}

Config :: struct {
    display:  Display_Config,
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions